Question about OpenGL and framerate
Hey guys ... I'm making a snake clone, and everything is working just fine ... except that when draw a large rectangle, or even when I split it into triangles and draw it as straps, it decreases my frame rate from near or above 40 to around 8. the culprit is the following code:
glBegin(GL_TRIANGLE_STRIP);
glColor3f(1.0f, 1.0f, 1.0f);
glVertex2f(0.0046f, -0.004f);
glVertex2f(0.1055f, -0.004f);
glVertex2f(0.0046f, -0.0778f);
glVertex2f(0.1055f, -0.0778f);
glEnd();
I have the similar effect on different video cards, but they are both 32 MB AGP cards. Another weird thing is that I've tried it on four cards in total, on two there is no lag at all, on the other two the effects I described took place. All cards were 32 MB or better. The processors are above 800 Mhz ...
Quote:Original post by vbbartlett
why are you using 4 vertexs?
Maybe because he's trying to draw a rectangle?
To the OP:
It sounds like you might be using a software renderer on the systems that get slow down. Make sure you have the latest video drivers and see if that helps. What cards are these anyway, and which ones are you getting slow down on?
4 vertexes ... 'cause I'm drawing a rectangle, out of two triangles ... I'm using GL_TRIANGLE_STRIP ... I'm using the very latest drivers ... I know 'cause I recently reinstalled my video card ... I changed it out ... not a new card, but new to my computer ... I mean ... would one rectangle really slow it down this much ... even if it is software rendering? but I just can't find the bug in my code ... this is really ....... me off, but I just can't figure the darn thing out ...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement