Skip to main content
gamedev.net
🔒 Locked

Rendering Question?

Started by TheNobleOne Aug 8, 2005 at 7:42 AM 1 replies 450+ views
Original Post
TheNobleOne
TheNobleOne
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?
My JournalComputer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter. (Eric Raymond)"C makes it easy to shoot yourself in the foot. C++ makes itharder, but when you do, it blows away your whole leg."-- Bjarne Stroustrup
ZMaster
ZMaster
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.
TheNobleOne
TheNobleOne
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.
My JournalComputer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter. (Eric Raymond)"C makes it easy to shoot yourself in the foot. C++ makes itharder, but when you do, it blows away your whole leg."-- Bjarne Stroustrup

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.