PDA

View Full Version : help me



Bruno
04-29-2000, 04:59 AM
I need help on my coding.
I'm making a off file loader(kind of asc) , i have managed to read all the vertices from the file, all the coords are on the structure of pointers , but when i draw the contents of the structure into the screen everything is dark..
I have checked and rechecked everything..
Can someone look at my code, and try to figure the error on my coding?
If someone is willing to check my code, could write me at brunomtc@hotmail.com or post the e-mail here, and i will send the code...
Thanks
Bruno

Bruno
04-29-2000, 09:28 AM
Ok, i figure it out...
One thing, is there any function that scales objects in opengl?
thanks

dmy
04-29-2000, 12:08 PM
glScale()
don't forget to enagle normalization with glEnable(GL_NORMALIZE)

Dolo/\/\ightY

Serge K
04-29-2000, 09:58 PM
glEnable(GL_NORMALIZE) usually bad for performance (unless you have 3D card with hardware geometry processor - GeForce,Quadro, Wildcat,...)

You can use GL_EXT_rescale_normal extension (if available):

#define GL_RESCALE_NORMAL_EXT 0x803A
glEnable( GL_RESCALE_NORMAL_EXT );

GL_EXT_rescale_normal (http://oss.sgi.com/projects/ogl-sample/registry/EXT/rescale_normal.txt)

Of course, if your application uses not too much polygons - it doesn't matter.