OpenGL and Light
crjjrc
crjjrc at gmail.com
Wed May 7 06:47:21 PDT 2008
On May 4, 2:09 am, Peter Poulsen <pe... at pgpnet.dk> wrote:
> I have this little program that is based on the one found here:http://wiki.wxwidgets.org/WxGLCanvas
>
> I'm trying to get light to work, but when I enable lighting it doesn't accept color values between 0.0f and 1.0f; if the value is >0.0f it is set to 1.0f, so the color is either full on or full off. Hopefully someone can explain to me how to get this working? I have it working in a "pure" glut implementation so I think it some wxWidget stuff I'm not setting up properly.
I'm not entirely sure what you're experiencing as I cannot reproduce
the problem under wxGTK 2.9. I can change the glColor call and see
the appropriate colors. I do see that you aren't specifying the
polygon's normal. This defaults to (0, 0, 1), so I guess that
shouldn't be a problem here. Have you tried this with lighting turned
off? This question might best be asked in comp.graphics.api.opengl.
- Chris
More information about the wx-users
mailing list