Is it correct to say that OpenGL 3.2+ core-profile is based on "retained mode" pattern?

Viewed 130

I'm currently learning OpenGL by this resource and the "Core-profile vs Immediate mode" chapter confused me by the next question.

If the old OpenGL versions (< 3.0) used immediate mode making the user (application) describe the building of a scene, and newer versions (>= 3.0) tried to abstract from it by using VBO and shaders as the only way to describe graphics, is it correct to say that core-profile in OpenGL 3.2+ makes OpenGL libraries based on a retained mode pattern, as the VBO data is something that is not stored by the user (application), therein not letting to describe how to build the scene?

I also can't understand - does adding VBOs in OpenGL 1.4 (maybe 1.5, I'm not sure already) makes these specifications based on a retained mode?

And so, is it correct to say that in OpenGL 3.2+ core-profile is based on retained mode and compatibility-profile is a mix of immediate and retained mode functionality?

My understanding of immediate and retained mode definitions:

  • Immediate mode is an API design pattern, which is characterized by a direct call from the application of rendering functions, and each frame with objects displayed on it is drawn from scratch from the data that the user passes to the renderer.

  • Retained mode is an API design pattern, which is characterized by an application describing objects that should be rendered in the scene without calling the rendering functions directly - the graphics library is responsible for displaying and converting the data of the displayed objects.

Feel free to indicate any inaccuracies or ambiguities.

1 Answers

Using those definitions for what you're talking about, OpenGL is not "retained mode". Your definition requires that in a "retained" renderer make rendering happen "without calling the rendering functions directly". But OpenGL doesn't render anything on its own; you have to call rendering commands directly, every frame, to make rendering happen.

Buffer objects are just a way to store data in memory that is directly GPU-accessible. They don't really change the nature of how the user interacts with the concept of rendering. You still have to tell OpenGL to render with some set of buffers buffers if you want to render the object those buffers represent.

It should be noted that the OpenGL community uses the term "immediate mode" specifically and only to refer to using glBegin/End-based vertex specification. It is not using the term in the same way as you have defined it. Indeed, the tutorial takes time out to explain what the term means within the context of OpenGL: "using OpenGL meant developing in immediate mode (often referred to as the fixed function pipeline)".

That being said, even the tutorial is being rather loose in its terminolgy, as it claims that "immediate mode" is synonymous with the "fixed function pipeline". Which it isn't. Fixed functionality can use data stored in buffer objects; indeed, buffer objects were added to OpenGL before shaders.

So it's best not to think too hard on the terminology.

Related