View Full Version : Strange looking triangles
I'm having troubles when drawing small triangles in a scene. They triangles doesn't look good, they look crooked even though the coordinates specifies a straight triangle.
What can be wrong? And how can I fix it?
I wonder if setting glMatrixMode to GL_PROJECTION may cause the problem?
I guess this is quite elementary but I would really appreciate any help.
Thanks in advance.
You should post the code, we cannot help you if we do not know what you have done.
do post code
...but yes not setting up a proper projection or modelview matrix would result in this behavior.
This is what I do before i draw the triangles
// draw triangles
WIDTH and HEIGHT variables are set to the width and height of the window. When I change the size of the window the appearance of the triangles change.
03-22-2005, 02:03 AM
glFrustum( -(WIDTH/2.0), WIDTH/2.0, -(HEIGHT/2.0), HEIGHT/2.0, near, far);
And you might want to use lower/higher values for the clipping planes to make sure you don't clip the triangles.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.