26 #include "DeviceContextGL.h" 27 #include "DeviceContextBase.h" 28 #include "BaseInterfacesGL.h" 29 #include "GLContextState.h" 43 virtual void QueryInterface(
const Diligent::INTERFACE_ID &IID, IObject **ppInterface )
override final;
53 virtual void SetBlendFactors(
const float* pBlendFactors =
nullptr)
override final;
55 virtual void SetVertexBuffers( Uint32 StartSlot, Uint32 NumBuffersSet,
IBuffer **ppBuffers, Uint32 *pStrides, Uint32 *pOffsets, Uint32 Flags )
override final;
61 virtual void SetViewports( Uint32 NumViewports,
const Viewport *pViewports, Uint32 RTWidth, Uint32 RTHeight )
override final;
63 virtual void SetScissorRects( Uint32 NumRects,
const Rect *pRects, Uint32 RTWidth, Uint32 RTHeight )
override final;
75 virtual void Flush()
override final;
85 GLContextState &GetContextState(){
return m_ContextState;}
87 void CommitRenderTargets();
94 GLContextState m_ContextState;
97 Uint32 m_CommitedResourcesTentativeBarriers;
99 std::vector<class TextureBaseGL*> m_BoundWritableTextures;
100 std::vector<class BufferGLImpl*> m_BoundWritableBuffers;
102 bool m_bVAOIsUpToDate =
false;
Base implementation of the Diligent::ITextureGL interface.
Definition: TextureBaseGL.h:41
Implementation of the Diligent::IShaderGL interface.
Definition: ShaderGLImpl.h:67
virtual void InvalidateState() override final
Invalidates the cached context state.
Definition: DeviceContextGLImpl.cpp:167
Namespace for the OpenGL implementation of the graphics engine.
Definition: BufferD3D11Impl.h:34
virtual void SetPipelineState(IPipelineState *pPipelineState) override final
Base implementation of IDeviceContext::SetPipelineState(); caches references to the pipeline state ob...
Definition: DeviceContextGLImpl.cpp:63
virtual bool UpdateCurrentGLContext() override final
Attaches to the active GL context in the thread.
Definition: DeviceContextGLImpl.cpp:959
virtual void SetViewports(Uint32 NumViewports, const Viewport *pViewports, Uint32 RTWidth, Uint32 RTHeight) override final
Sets an array of viewports.
Definition: DeviceContextGLImpl.cpp:183
Base implementation of the device context.
Definition: DeviceContextBase.h:68
Implementation of the Diligent::IDeviceContextGL interface.
Definition: DeviceContextGLImpl.h:35
Describes the viewport.
Definition: DeviceContext.h:376
virtual void SetBlendFactors(const float *pBlendFactors=nullptr) override final
Definition: DeviceContextGLImpl.cpp:153
virtual void FinishCommandList(class ICommandList **ppCommandList) override final
Finishes recording commands and generates a command list.
Definition: DeviceContextGLImpl.cpp:949
Shader resource binding interface.
Definition: ShaderResourceBinding.h:40
Implementation of the render device interface in OpenGL.
Definition: RenderDeviceGLImpl.h:53
virtual void ClearDepthStencil(ITextureView *pView, Uint32 ClearFlags, float fDepth, Uint8 Stencil) override final
Clears a depth-stencil view.
Definition: DeviceContextGLImpl.cpp:840
Describes dispatch command arguments.
Definition: DeviceContext.h:312
virtual void SetVertexBuffers(Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer **ppBuffers, Uint32 *pStrides, Uint32 *pOffsets, Uint32 Flags) override final
Base implementation of IDeviceContext::SetVertexBuffers(); validates parameters and caches references...
Definition: DeviceContextGLImpl.cpp:161
virtual void Draw(DrawAttribs &DrawAttribs) override final
Executes a draw command.
Definition: DeviceContextGLImpl.cpp:639
virtual void Flush() override final
Flushes the command buffer.
Definition: DeviceContextGLImpl.cpp:944
virtual void SetIndexBuffer(IBuffer *pIndexBuffer, Uint32 ByteOffset) override final
Base implementation of IDeviceContext::SetIndexBuffer(); caches the strong reference to the index buf...
Definition: DeviceContextGLImpl.cpp:177
virtual void CommitShaderResources(IShaderResourceBinding *pShaderResourceBinding, Uint32 Flags) override final
Commits shader resources to the device context.
Definition: DeviceContextGLImpl.cpp:129
Buffer interface.
Definition: Buffer.h:200
virtual void SetScissorRects(Uint32 NumRects, const Rect *pRects, Uint32 RTWidth, Uint32 RTHeight) override final
Sets active scissor rects.
Definition: DeviceContextGLImpl.cpp:242
virtual void SetRenderTargets(Uint32 NumRenderTargets, ITextureView *ppRenderTargets[], ITextureView *pDepthStencil) override final
Binds one or more render targets and the depth-stencil buffer to the pipeline. It also sets the viewp...
Definition: DeviceContextGLImpl.cpp:315
Texture view interface.
Definition: TextureView.h:163
Command list interface.
Definition: CommandList.h:42
Implementation of the Diligent::IBufferGL interface.
Definition: BufferGLImpl.h:40
virtual void ExecuteCommandList(class ICommandList *pCommandList) override final
Executes recorded commands in a command list.
Definition: DeviceContextGLImpl.cpp:954
Definition: PipelineState.h:209
Defines the draw command attributes.
Definition: DeviceContext.h:212
Describes the rectangle.
Definition: DeviceContext.h:420
virtual void ClearRenderTarget(ITextureView *pView, const float *RGBA) override final
Clears a render target view.
Definition: DeviceContextGLImpl.cpp:883
virtual void QueryInterface(const Diligent::INTERFACE_ID &IID, IObject **ppInterface) override final
Queries the specific interface, see IObject::QueryInterface() for details.
virtual void SetStencilRef(Uint32 StencilRef) override final
Sets the stencil reference value.
Definition: DeviceContextGLImpl.cpp:144
virtual void DispatchCompute(const DispatchComputeAttribs &DispatchAttrs) override final
Executes a dispatch compute command.
Definition: DeviceContextGLImpl.cpp:804
virtual void TransitionShaderResources(IPipelineState *pPipelineState, IShaderResourceBinding *pShaderResourceBinding) override final
Transitions shader resources to the require states.
Definition: DeviceContextGLImpl.cpp:124