Diligent Engine API Reference
|
Interface to the device context object implemented in OpenGL. More...
Public Member Functions | |
virtual bool | UpdateCurrentGLContext ()=0 |
Attaches to the active GL context in the thread. More... | |
Public Member Functions inherited from Diligent::IDeviceContext | |
virtual void | QueryInterface (const Diligent::INTERFACE_ID &IID, IObject **ppInterface)=0 |
Queries the specific interface, see IObject::QueryInterface() for details. | |
virtual void | SetPipelineState (IPipelineState *pPipelineState)=0 |
Sets the pipeline state. More... | |
virtual void | TransitionShaderResources (IPipelineState *pPipelineState, IShaderResourceBinding *pShaderResourceBinding)=0 |
Transitions shader resources to the require states. More... | |
virtual void | CommitShaderResources (IShaderResourceBinding *pShaderResourceBinding, Uint32 Flags)=0 |
Commits shader resources to the device context. More... | |
virtual void | SetStencilRef (Uint32 StencilRef)=0 |
Sets the stencil reference value. More... | |
virtual void | SetBlendFactors (const float *pBlendFactors=nullptr)=0 |
virtual void | SetVertexBuffers (Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer **ppBuffers, Uint32 *pStrides, Uint32 *pOffsets, Uint32 Flags)=0 |
Binds vertex buffers to the pipeline. More... | |
virtual void | InvalidateState ()=0 |
Invalidates the cached context state. More... | |
virtual void | SetIndexBuffer (IBuffer *pIndexBuffer, Uint32 ByteOffset)=0 |
Binds an index buffer to the pipeline. More... | |
virtual void | SetViewports (Uint32 NumViewports, const Viewport *pViewports, Uint32 RTWidth, Uint32 RTHeight)=0 |
Sets an array of viewports. More... | |
virtual void | SetScissorRects (Uint32 NumRects, const Rect *pRects, Uint32 RTWidth, Uint32 RTHeight)=0 |
Sets active scissor rects. More... | |
virtual void | SetRenderTargets (Uint32 NumRenderTargets, ITextureView *ppRenderTargets[], ITextureView *pDepthStencil)=0 |
Binds one or more render targets and the depth-stencil buffer to the pipeline. It also sets the viewport to match the first non-null render target or depth-stencil buffer. More... | |
virtual void | Draw (DrawAttribs &DrawAttribs)=0 |
Executes a draw command. More... | |
virtual void | DispatchCompute (const DispatchComputeAttribs &DispatchAttrs)=0 |
Executes a dispatch compute command. More... | |
virtual void | ClearDepthStencil (ITextureView *pView, Uint32 ClearFlags=CLEAR_DEPTH_FLAG, float fDepth=1.f, Uint8 Stencil=0)=0 |
Clears a depth-stencil view. More... | |
virtual void | ClearRenderTarget (ITextureView *pView, const float *RGBA=nullptr)=0 |
Clears a render target view. More... | |
virtual void | FinishCommandList (ICommandList **ppCommandList)=0 |
Finishes recording commands and generates a command list. More... | |
virtual void | ExecuteCommandList (ICommandList *pCommandList)=0 |
Executes recorded commands in a command list. More... | |
virtual void | Flush ()=0 |
Flushes the command buffer. | |
virtual void | SetSwapChain (ISwapChain *pSwapChain)=0 |
Sets the swap chain in the device context. More... | |
Interface to the device context object implemented in OpenGL.
|
pure virtual |
Attaches to the active GL context in the thread.
If an application uses multiple GL contexts, this method must be called before any other command to let the engine update active context every time when control flow is passed over from the main application
Implemented in Diligent::DeviceContextGLImpl.