PDA

View Full Version : A couple of basic questions. . .



Nelah
04-02-2003, 07:47 PM
I am just beginning to learn what intricate things OpenGL can do. I need some help with understanding some basic concepts. First, is there a wait function predefined in OpenGL? Also, I know there is a GLEnable(GL_LIGHTING), but if you're using colors, it seems useless. Is there a predefined color lighting scheme? And finally, can anyone break down the texture functions. I can't understand what's going on. Thanks.

shinpaughp
04-02-2003, 08:05 PM
There is not a wait function in OpenGL. You must use API functions provided by whatever platform you are programming on whether it is a timer or you use time difference is up to you. GLUT does provide timer and other windowing features, as do some other toolkits.

For lighting you need to set material color, which can be done through function glMaterial or by using glEnable(GL_COLOR_MATERIAL) in conjunction with glColorMaterial to set which types of light are to have the current color which you set with glColor.

For textures, read the vast amount of info on textures which can be found in the FAQs section of the main page of this site as well as the documentation section in the OpenGL specification and look at tutorials which can be found in the coding section from main page of this site. Also, read the red book (aka OpenGL Programming Guide).

Best bet is FAQs section as well as the vast number of tutorial sites. Most populer seem to be http://nehe.gamedev.net and http://www.gametutorials.com .

[This message has been edited by shinpaughp (edited 04-03-2003).]

nexusone
04-03-2003, 05:26 AM
Remember openGL is a graphics API, wait and input type functions are not part of OpenGL.

Now GLUT (GL Utility Toolkit) add functions timer functions, mouse and keyboard.

Best you learn by example, nehe.gamedev.net will teach you openGL in step's after each step you will learn how openGL works.



Originally posted by Nelah:
I am just beginning to learn what intricate things OpenGL can do. I need some help with understanding some basic concepts. First, is there a wait function predefined in OpenGL? Also, I know there is a GLEnable(GL_LIGHTING), but if you're using colors, it seems useless. Is there a predefined color lighting scheme? And finally, can anyone break down the texture functions. I can't understand what's going on. Thanks.