Some with OpenGL

Yes, I know this maybe is no place for OpenGL questions, but as I
thought SDL supports OGL, I thought this even could be the right place:)
lol

If it is not, please, OGL users, advice one good.---------------------------

My OpenGL app has two spheres in front with a quad in back; there is
spotlight pointing towards this scene. The lighting of the two spheres
is correct, however, that of the quad is not. If I take out the spheres,
the quad lighting is still not working. The front face is in the correct
position, and I can’t figure out what could possibly be the problem. Is
there a special option I need to set in order to have quads illuminated
correctly? Thank you for any help

Tonci Jukic

My OpenGL app has two spheres in front with a quad in back; there is
spotlight pointing towards this scene. The lighting of the two spheres
is correct, however, that of the quad is not. If I take out the spheres,
the quad lighting is still not working. The front face is in the correct
position, and I can’t figure out what could possibly be the problem. Is
there a special option I need to set in order to have quads illuminated
correctly? Thank you for any help

Tonci Jukic

I suggest you try representing your quad behind the spheres as a grid of
quads rather than just a single quad. OpenGL’s basic lighting (no extensions
used) is only calculated at the vertices and then interpolated across the
polygon surface. So if your quad is large you’ll only get 4 vertices, 4
lighting solutions, that are then blended between as your shading. But if
you broke that quad up into an 8x8 grid of quads you’ll see much more
accurate shading due to 81 shading solutions being calcuated and
interpolated between. (An 8x8 grid has 9 vertices on each side, giving you
81 separate shading solutions.)

Since no one else made any suggestions, I thought this might help…
-Blake

----- Original Message -----
From: tonci.jukic@st.hinet.hr (Tonci Jukic)
Sent: Saturday, June 15, 2002 12:11 PM
Subject: [SDL] Some with OpenGL