Diligent::IRenderDeviceGL struct

Exposes OpenGL-specific functionality of a render device.

Base classes

struct IRenderDevice
Render device interface.

Derived classes

class IRenderDeviceGLES
Interface to the render device object implemented in OpenGLES.

Public functions

auto CreateTextureFromGLHandle(Uint32 GLHandle, Uint32 GLBindTarget, const TextureDesc& TexDesc, RESOURCE_STATE InitialState, ITexture** ppTexture) -> void METHOD() virtual
Creates a texture from OpenGL handle.
auto CreateBufferFromGLHandle(Uint32 GLHandle, const BufferDesc& BuffDesc, RESOURCE_STATE InitialState, IBuffer** ppBuffer) -> void METHOD() virtual
Creates a buffer from OpenGL handle.
auto CreateDummyTexture(const TextureDesc& TexDesc, RESOURCE_STATE InitialState, ITexture** ppTexture) -> void METHOD() virtual
Creates a dummy texture with null handle.

Function documentation

void METHOD() Diligent::IRenderDeviceGL::CreateTextureFromGLHandle(Uint32 GLHandle, Uint32 GLBindTarget, const TextureDesc& TexDesc, RESOURCE_STATE InitialState, ITexture** ppTexture) virtual

Creates a texture from OpenGL handle.

Parameters
GLHandle in - OpenGL texture handle.
GLBindTarget in - OpenGL bind target. If this parameter is null, the engine will automatically select the target based on texture type (e.g. RESOURCE_DIM_TEX_2D will map to GL_TEXTURE_2D). An application should typically use this paramter when the texture has non-standard bind target such as, GL_TEXTURE_EXTERNAL_OES.
TexDesc in - Texture description. The engine can automatically set texture width, height, depth, mip levels count, and format. Remaining fields should be set up by the app.
InitialState in - Initial texture state. See Diligent::RESOURCE_STATE.
ppTexture out - Address of the memory location where the pointer to the texture interface will be stored. The function calls AddRef(), so that the new object will contain one reference.

void METHOD() Diligent::IRenderDeviceGL::CreateBufferFromGLHandle(Uint32 GLHandle, const BufferDesc& BuffDesc, RESOURCE_STATE InitialState, IBuffer** ppBuffer) virtual

Creates a buffer from OpenGL handle.

Parameters
GLHandle in - OpenGL buffer handle
BuffDesc in - Buffer description. The engine can automatically recover buffer size, but the rest of the fields need to be set by the client.
InitialState in - Initial buffer state. See Diligent::RESOURCE_STATE.
ppBuffer out - Address of the memory location where the pointer to the texture interface will be stored. The function calls AddRef(), so that the new object will contain one reference.

void METHOD() Diligent::IRenderDeviceGL::CreateDummyTexture(const TextureDesc& TexDesc, RESOURCE_STATE InitialState, ITexture** ppTexture) virtual

Creates a dummy texture with null handle.

Parameters
TexDesc in - Texture description.
InitialState in - Initial texture state. See Diligent::RESOURCE_STATE.
ppTexture out - Address of the memory location where the pointer to the texture interface will be stored. The function calls AddRef(), so that the new object will contain one reference.

The main usage of dummy textures is to serve as render target and depth buffer proxies in a swap chain. When dummy color buffer is set as render target, the engine binds default FBO provided by the swap chain.