Archived

This topic is now archived and is closed to further replies.

Infinite Monkey

Immediate vs buffered

Recommended Posts

I''m writing a cross-API renderer, using Direct3D and OpenGL. One of the features that I am adding is an immediate mode type interface, bassed on the "Implementing Immediate Mode for DirectX" article, at least for the directX side of things. For the OpenGL renderer, I don''t know what would be better for this interface. Either 1) Routing the methods straight into the OpenGL functions (my iVertex3f would just call glVertex3f) Or 2) Putting the incoming immediate mode calls into a set of arrays, similarly to the way the above article does it for DirectX, but in the smoother, creamier OpenGL flavour. Thoughts?

Share this post


Link to post
Share on other sites
Go for (1). OGL Immediate mode is already slow. Don''t slow it even more or you''ll not need it at all. (2) is a very weird option. Think about it:

iVertex in option (2): a function that renders in OGL by calling a dircet3d wrapper that emulates OGL....... (shudder)

Sander Maréchal
[Lone Wolves Game Development][RoboBlast][Articles][GD Emporium][Webdesign][E-mail]


GSACP: GameDev Society Against Crap Posting
To join: Put these lines in your signature and don''t post crap!

Share this post


Link to post
Share on other sites
No, thats not what I meant. For option (2), I was meaning that the data from iVertex3f, iColour3f etc. would be stored in an OpenGL vertex array, and then sent to the card as one lump. Given that I already have the system set up for doing this, what I want to know is which will be faster, doing it this way or jamming everything through the OpenGL immediate mode stuff (glVertex etc).

Share this post


Link to post
Share on other sites
that would probably depend on the size and how often you need the same data. setting up arrays for a lousy quad thats changing every 5 frames anyway would be a waste, while using IM for a static 50000 faces mesh doesnt seem to be a good idea.

Share this post


Link to post
Share on other sites