Jump to content
  • Advertisement
Sign in to follow this  
TheNobleOne

Rendering Question?

This topic is 4853 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

Ok now I have a big rendering question. How should I render? I know I can use textured quads. However, that seems like it can get expencive having to render textured quads over and over and over because glBegin() is quite slow. Is it possible to render the bitmap tiles to the screen without quads? If so this might be the way to go. However, I could go the quad way and only use larger quads more like surfaces and multi texture them. Is there a standard way to do this in opengl?

Share this post


Link to post
Share on other sites
Advertisement
Are you talking about 2D or 3D programming?
For what concerns 2D programming (tile based approach, for example) I can hardly think of a situation where you will come to the limits of todays gfx hardware by just drawing textured 2d quads to your screen. I mean take a 2D RPG or side scrolling jump and run and then count how many (actually not many :-) ) quads you will need to make them look nice...
As for 3D programming: Yeah, glBegin() IS actually quite slow. If you need to draw a lot of quads with the same texture on them, you should look into drawing arrays. glDrawArrays, glDrawArrayElements in particular. But note, that calls to those functions are even slower if you just draw 4 vertices. Nevertheless, if you send a few hundred vertices down the pipeline those calls have a great speed advantage over the glBegin() glEnd() approach.

Share this post


Link to post
Share on other sites
Ok so when drawing the ground of the map i should use arrays. when drawing the character sprite begin would be fine. So with a combonation of them it should work quite nice. I am doing 2D that is why I posted in the Isometric board. I don't feel I am ready for a 3D engine just yet lol. Thanks for the input.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!