WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-06-2009, 01:10 PM
RodRSpv RodRSpv is offline
Member
 
Join Date: Feb 2009
Posts: 9
Send a message via Yahoo to RodRSpv
OpenGL vs. Vizard?

Is there a way to convert openGL functions to Vizard compatible functions?
Reply With Quote
  #2  
Old 04-06-2009, 01:15 PM
RodRSpv RodRSpv is offline
Member
 
Join Date: Feb 2009
Posts: 9
Send a message via Yahoo to RodRSpv
Smile Added material

Here is the code for OpenGL functions that i have. Is there a way to find Vizard compatible functions for them? Help on any of this would be greatly appreciated.

# OpenGL functions

from __future__ import division
from OpenGL.GL import *

from defines import *


def set_color (army, colorMode):
if(colorMode == shadow):
glColor4d(0,0.0,0,0.6)
#glmaterialfv(gl_front, gl_shininess, 0.0)
#glmaterialfv(gl_front, gl_ambient, [0, 0, 0, 0.5])
#glmaterialfv(gl_front, gl_diffuse, [0, 0, 0, 0])
#glmaterialfv(gl_front, gl_specular, [0, 0, 0, 0])
elif(colorMode == color2):
glColor3d(0,0,0)
glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, 0.0)
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, [0.0, 0.0, 0.0, 1.0])
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, [0.0, 0.0, 0.0, 1.0])
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, [0.35, 0.35, 0.35, 1.0])
elif(army == black):
glColor3d(0.6,0.2,0.4)
glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, 0.0)
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, [0.0, 0.0, 0.0, 1.0])
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, [0.0, 0.0, 0.0, 1.0])
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, [0.35, 0.35, 0.35, 1.0])
elif(army == white):
glColor3d(0.3,0.6,0.7)
glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, 0.0)
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, [0.0, 0.0, 0.0, 1.0])
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, [0.0, 0.0, 0.0, 1.0])
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, [0.35, 0.35, 0.35, 1.0])
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 11:13 AM
Vizard tech tip: Text to Speech Jeff Vizard 1 01-15-2009 09:39 PM
Vizard and Augmented Reality realvision Vizard 4 04-04-2008 10:59 AM
Vizard won't run wouters Vizard 5 02-05-2008 11:12 AM
Fall 2007 release of Vizard R3 3 D Announcements 0 10-15-2007 04:50 PM


All times are GMT -7. The time now is 06:05 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC