Jump to content
  • Advertisement
Sign in to follow this  
gamezo

OpenGL Question about OpenGL and framerate

This topic is 5413 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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();

Share this post


Link to post
Share on other sites
Advertisement
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 ...

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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 ...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!