Explain me: Immediate mode and Retained mode. In OGL and D3D!

I know this is not a D3D forum, but you should know about this. Can you briefly explain me the differences between retained and immediate mode in D3D? Is there something similar in OGL?

Don’t know exactly but i think that in immediate mode you work in low level with primitives (triangles and stuff, like OpenGL) while in retained mode you work in an higher level with the whole world … or something like that. There’s nothing similar in OpenGL.

An immediate-mode API just draws the primitives you throw at it; what you throw at it is entirely up to you. You’re responsible for managing the scene database.

A retained-mode API manages the scene database for you. You initialize it, and you can modify it, but all you have to do is tell it “right, draw what you’ve got”. (With J3D you don’t even need to do that.)

Some things, like automatic shadowing, ray-tracing and certain types of occlusion culling, can only be done by a RM API, because access to the whole scene database is required. There’s no way to put such things in OpenGL without breaking the architecture horribly. (That doesn’t stop people asking in the “Suggestions” forum every couple of weeks though… )

RM APIs are almost always layered on top of IM APIs. There are several RM APIs built on OpenGL, including Inventor, Performer, Optimizer and any number of commercial and hobby engines.

[This message has been edited by MikeC (edited 09-18-2000).]

Immediate mode is when each frame you call



Retained is using display lists and the like

at app startup


//can be much bigger (and should)

each frame