Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is a render target in opengl?

Tags:

opengl

Just as the title says, what it a render target in OpenGL? I am so new to OpenGL and all the websites I've seen are quite confusing to me.

Is it just a buffer where I put stuff that will be used later for rendering?

If you could provide a good reference to read about it would be really appreciated.

like image 665
BRabbit27 Avatar asked Nov 28 '14 09:11

BRabbit27


People also ask

What is a render target view?

Render targets enable a scene to be rendered to a temporary intermediate buffer, rather than to the back buffer to be rendered to the screen.

What is multiple render targets OpenGL?

In the field of 3D computer graphics, Multiple Render Targets, or MRT, is a feature of modern graphics processing units (GPUs) that allows the programmable rendering pipeline to render images to multiple render target textures at once.

What does rendering mean in OpenGL?

The OpenGL rendering pipeline is initiated when you perform a rendering operation. Rendering operations require the presence of a properly-defined vertex array object and a linked Program Object or Program Pipeline Object which provides the shaders for the programmable pipeline stages.

What is a render buffer?

Renderbuffer is simply a data storage object containing a single image of a renderable internal format. It is used to store OpenGL logical buffers that do not have corresponding texture format, such as stencil or depth buffer.


1 Answers

A render buffer is any specially created single buffer to which part of rendering may be directed. A colour buffer is the most obvious example, a depth buffer probably the second-most obvious.

A frame buffer is a bound collection of render buffers, e.g. it could be the combination of a colour buffer and a depth buffer. It may also use a texture as the destination for one of those streams of information instead of a render buffer (caveats apply but not relevantly).

Textures are not render buffers and render buffers are not textures. They're distinct things, even though a frame buffer can use either as a target. So a render target is the collective term for either a render buffer or a texture being used as the target for rendering.

The phrase is informally defined but is recognised by Kronos — e.g. the GL 4.4 spec refers to GL_ARB_draw_buffers as being "the name string for multiple render targets" but that specification never mentions 'render targets', or even uses the word 'target'. Instead it defines the mechanism that allows multiple colour buffers to be simultaneous named targets. So the two things taken together imply the definution above.

like image 109
Tommy Avatar answered Sep 22 '22 12:09

Tommy