PDA

View Full Version : Shading problem? (pyglet-problem?, my problem?)



H2OBrain
12-02-2009, 10:04 AM
Hello

This is my first try with OpenGL, so maybe i'm just missunderstanding something..

I've managed to draw a Sphere as indexed vertices in pyglet. I also provide normals. Evething looks fine, except in glShadeModel(GL_FLAT)-mode the shading is wrong :(

http://hrmeier.ch/extra/Sphere-Error.png

Anyone knows, what i'm doing wrong?

Greetings, h2obrain


Edit:
I think pyglet uses OpenGL 2.1

With glShadeModel(GL_SMOOTH) it looks ok i think
http://hrmeier.ch/extra/Sphere-Error2.png

H2OBrain
12-03-2009, 08:31 AM
oke.. my sphere-drawing-function was buggy