LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: paandar on December 13, 2012, 15:13:06

Title: Vertex color change when moving camera... [SOLVED]
Post by: paandar on December 13, 2012, 15:13:06
Well, I'm trying to learn some OpenGL programming with simple examples, so...the problem is, when drawing a quad with four different vertex colors and using smooth shading, the gradient filling the quad changes when some points go outside the viewport. I'm not using any kind of culling, only doing a view matrix transformation to rotate the scene. See images below

(http://static.inky.ws/image/3512/50c9eed639769/1.png)

(http://static.inky.ws/image/3513/50c9eed639769/2.png)

Can anybody give me a hint?
Thanks ;)
Title: Re: Vertex color change when moving camera...
Post by: CodeBunny on December 14, 2012, 14:10:01
It looks like it is converting it to triangles differently. Try drawing it with a Triangle Strip.
Title: Re: Vertex color change when moving camera...
Post by: Fool Running on December 17, 2012, 14:51:19
Code might help.
Title: Re: Vertex color change when moving camera... [SOLVED]
Post by: paandar on December 30, 2012, 21:49:08
Already fixed it using triangles, thanks anyway!!