Hi, I would like to is that if I calculate the normal of the polygon in mesh and then call glEnable(GL_Lighting), glMaterialfv(GL_front, GL_AMBIENT, matAmbient)… etc, is that this kind of lighting referred to hardware light? Is it better to use sth like slope light/ real-time photorealistic terrain lighting? What is the disadvatnage if I just call those openGL function??
Yes, “Hardware Transform and Lighting” referres to the standard vertex-lighting, which you can use through OpenGL.
So, if that´s good enough for your purpose, than use it. For terrrain and models, as in a tank-game, it should look very well.
THx, Jan2000. =)
Just a bit confused (becoz I am new in OpenGL), it says that hardware lighting can’t be used in dynamic mesh… why is it so and what is the difference between static and dynamic mesh?( I hope that you could forgive me for asking such a silly question… but I really get a bit confused and not sure abt the static and dynamic mesh)
Thx a lot
There are no static and dynamic meshes - simply because OpenGL doesn’t provide (or better said: doesn’t force) object structures.
The way you represent your “objects” in OpenGL is utterly up to you - and as long as you provide the correct normals, OpenGL lighting will be correct too.
Just a bit confused (becoz I am new in OpenGL)
You do realize that this is the ADVANCED board don’t you? Every topic you have started here is very beginner and should remain on the beginner board. I’ve never understood why a beginner to opengl thinks they need to post their newbie questions on the advanced board. Just letting you know, I’m not trying to flame you or anything.
I am sorry for that.. Next time when I try to post msg, I won't post here Sorry for that.
btw writing in beginner topic doesnt mean you get answers from beginners. for examlpe some times i visit that forum too, becouse checking your knowledge and skills can be measured by teaching others…
Yep… I understand it now… sorry for that…
And would anyone be kind enough to help me with the topic thread “void drawelements in vertex array”? I still can’t solve my problem and it is quite urgent…