Skip to main content
gamedev.net
🔒 Locked

Immediate vs buffered

Started by Infinite Monkey 2 replies 600+ views
Original Post
Infinite Monkey
Infinite Monkey
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?
Sander
Sander
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!
Infinite Monkey
Infinite Monkey
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).
Trienco
Trienco
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.
f@dzhttp://festini.device-zero.de

Topic Locked

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

Sign in to reply to this topic.