Go to the documentation of this file.
97 Uint32 RTHeight) override final;
103 Uint32 RTHeight) override final;
196 const
Box* pMapRegion,
288 __forceinline
void PrepareForDraw(
DRAW_FLAGS Flags,
bool IsIndexed, GLenum& GlTopology);
289 __forceinline
void PrepareForIndexedDraw(
VALUE_TYPE IndexType,
Uint32 FirstIndexLocation, GLenum& GLIndexType,
Uint32& FirstIndexByteOffset);
290 __forceinline
void PrepareForIndirectDraw(
IBuffer* pAttribsBuffer);
291 __forceinline
void PostDraw();
294 void BindProgramResources();
296 #ifdef DILIGENT_DEVELOPMENT
297 void DvpValidateCommittedShaderResources();
303 struct BindInfo : CommittedShaderResources
305 #ifdef DILIGENT_DEVELOPMENT
307 std::array<TBindings, MAX_RESOURCE_SIGNATURES> BaseBindings = {};
318 std::vector<class TextureBaseGL*> m_BoundWritableTextures;
319 std::vector<class BufferGLImpl*> m_BoundWritableBuffers;
321 RefCntAutoPtr<ISwapChainGL> m_pSwapChain;
323 bool m_IsDefaultFBOBound =
false;
327 std::vector<OptimizedClearValue> m_AttachmentClearValues;
MAP_FLAGS
Special map flags.
Definition: GraphicsTypes.h:227
Exposes OpenGL-specific functionality of a swap chain.
Definition: SwapChainGL.h:49
Implementation of the Diligent::PipelineResourceSignatureGLImpl class.
Definition: PipelineResourceSignatureGLImpl.hpp:63
Base interface for a reference counter object that stores the number of strong and weak references an...
Definition: ReferenceCounters.h:44
virtual void TransitionResourceStates(Uint32 BarrierCount, StateTransitionDesc *pResourceBarriers) override final
Implementation of IDeviceContext::TransitionResourceStates() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1467
virtual void SetStencilRef(Uint32 StencilRef) override final
Implementation of IDeviceContext::SetStencilRef() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:178
void * PVoid
Definition: BasicTypes.h:56
Shader object implementation in OpenGL backend.
Definition: ShaderGLImpl.hpp:39
virtual void WaitForFence(IFence *pFence, Uint64 Value, bool FlushContext) override final
Implementation of IDeviceContext::WaitForFence() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1128
This structure is used by IDeviceContext::UpdateSBT().
Definition: DeviceContext.h:1303
This structure is used by IDeviceContext::TraceRaysIndirect().
Definition: DeviceContext.h:1284
Shader resource binding interface.
Definition: ShaderResourceBinding.h:58
virtual void CopyTLAS(const CopyTLASAttribs &Attribs) override final
Implementation of IDeviceContext::CopyTLAS() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1563
virtual void TransitionShaderResources(IPipelineState *pPipelineState, IShaderResourceBinding *pShaderResourceBinding) override final
Implementation of IDeviceContext::TransitionShaderResources() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:163
This structure is used by IDeviceContext::TraceRays().
Definition: DeviceContext.h:1267
BeginRenderPass command attributes.
Definition: DeviceContext.h:731
Shader binding table interface.
Definition: ShaderBindingTable.h:93
virtual void CopyTexture(const CopyTextureAttribs &CopyAttribs) override final
Implementation of IDeviceContext::CopyTexture() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1308
Defines the mesh indirect draw count command attributes.
Definition: DeviceContext.h:440
Pipeline state interface.
Definition: PipelineState.h:505
RESOURCE_STATE_TRANSITION_MODE
Defines resource state transition mode performed by various commands.
Definition: DeviceContext.h:136
Uint32 Flags
Definition: DXBCUtils.cpp:71
CLEAR_DEPTH_STENCIL_FLAGS
Defines which parts of the depth-stencil buffer to clear.
Definition: DeviceContext.h:483
Base interface for all dynamic objects in the engine.
Definition: Object.h:41
uint64_t Uint64
64-bit unsigned integer
Definition: BasicTypes.h:50
Device context implementation in OpenGL backend.
Definition: DeviceContextGLImpl.hpp:51
This structure is used by IDeviceContext::WriteBLASCompactedSize().
Definition: DeviceContext.h:1217
This structure is used by IDeviceContext::WriteTLASCompactedSize().
Definition: DeviceContext.h:1242
virtual void BuildTLAS(const BuildTLASAttribs &Attribs) override final
Implementation of IDeviceContext::BuildTLAS() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1553
Texture view interface.
Definition: TextureView.h:202
virtual void DrawMeshIndirect(const DrawMeshIndirectAttribs &Attribs, IBuffer *pAttribsBuffer) override final
Implementation of IDeviceContext::DrawMeshIndirect() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:933
ResourceBinding::BindInfo BindInfo
Definition: DXBCUtils.hpp:40
Defines the mesh draw command attributes.
Definition: DeviceContext.h:376
virtual void SetViewports(Uint32 NumViewports, const Viewport *pViewports, Uint32 RTWidth, Uint32 RTHeight) override final
Implementation of IDeviceContext::SetViewports() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:223
virtual void UpdateSBT(IShaderBindingTable *pSBT, const UpdateIndirectRTBufferAttribs *pUpdateIndirectBufferAttribs) override final
Implementation of IDeviceContext::UpdateSBT() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1588
Box.
Definition: GraphicsTypes.h:2407
Definition: Texture.h:245
DeviceContextGLImpl(IReferenceCounters *pRefCounters, RenderDeviceGLImpl *pDeviceGL, bool bIsDeferred)
Definition: DeviceContextGLImpl.cpp:61
virtual void DispatchComputeIndirect(const DispatchComputeIndirectAttribs &Attribs, IBuffer *pAttribsBuffer) override final
Implementation of IDeviceContext::DispatchComputeIndirect() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:966
virtual void WriteTLASCompactedSize(const WriteTLASCompactedSizeAttribs &Attribs) override final
Implementation of IDeviceContext::WriteTLASCompactedSize() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1573
virtual void DrawMeshIndirectCount(const DrawMeshIndirectCountAttribs &Attribs, IBuffer *pAttribsBuffer, IBuffer *pCountBuffer) override final
Implementation of IDeviceContext::DrawMeshIndirectCount() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:938
Unique interface identifier.
Definition: InterfaceID.h:37
Buffer interface.
Definition: Buffer.h:187
virtual void Draw(const DrawAttribs &Attribs) override final
Implementation of IDeviceContext::Draw() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:778
GLContextState & GetContextState()
Definition: DeviceContextGLImpl.hpp:271
virtual void EndQuery(IQuery *pQuery) override final
Implementation of IDeviceContext::EndQuery() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1189
virtual void ClearDepthStencil(ITextureView *pView, CLEAR_DEPTH_STENCIL_FLAGS ClearFlags, float fDepth, Uint8 Stencil, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final
Implementation of IDeviceContext::ClearDepthStencil() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1004
Resource state transition barrier description.
Definition: DeviceContext.h:1333
virtual void DispatchCompute(const DispatchComputeAttribs &Attribs) override final
Implementation of IDeviceContext::DispatchCompute() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:944
virtual void Flush() override final
Implementation of IDeviceContext::Flush() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1091
virtual void DrawIndirect(const DrawIndirectAttribs &Attribs, IBuffer *pAttribsBuffer) override final
Implementation of IDeviceContext::DrawIndirect() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:864
virtual void MapTextureSubresource(ITexture *pTexture, Uint32 MipLevel, Uint32 ArraySlice, MAP_TYPE MapType, MAP_FLAGS MapFlags, const Box *pMapRegion, MappedTextureSubresource &MappedData) override final
Implementation of IDeviceContext::MapTextureSubresource() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1411
Command list interface.
Definition: CommandList.h:48
SET_VERTEX_BUFFERS_FLAGS
Defines allowed flags for IDeviceContext::SetVertexBuffers() function.
Definition: DeviceContext.h:578
virtual void SetScissorRects(Uint32 NumRects, const Rect *pRects, Uint32 RTWidth, Uint32 RTHeight) override final
Implementation of IDeviceContext::SetScissorRects() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:286
virtual void CopyBuffer(IBuffer *pSrcBuffer, Uint32 SrcOffset, RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode, IBuffer *pDstBuffer, Uint32 DstOffset, Uint32 Size, RESOURCE_STATE_TRANSITION_MODE DstBufferTransitionMode) override final
Implementation of IDeviceContext::CopyBuffer() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1266
Describes multi-sampled texture resolve command arguments.
Definition: DeviceContext.h:549
Describes dispatch command arguments.
Definition: DeviceContext.h:523
virtual void ExecuteCommandLists(Uint32 NumCommandLists, ICommandList *const *ppCommandLists) override final
Implementation of IDeviceContext::ExecuteCommandLists() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1110
virtual void UnmapTextureSubresource(ITexture *pTexture, Uint32 MipLevel, Uint32 ArraySlice) override final
Implementation of IDeviceContext::UnmapTextureSubresource() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1440
VALUE_TYPE
Value type.
Definition: GraphicsTypes.h:49
virtual void UpdateBuffer(IBuffer *pBuffer, Uint32 Offset, Uint32 Size, const void *pData, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final
Implementation of IDeviceContext::UpdateBuffer() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1254
Defines the indexed indirect draw command attributes.
Definition: DeviceContext.h:330
virtual void CopyBLAS(const CopyBLASAttribs &Attribs) override final
Implementation of IDeviceContext::CopyBLAS() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1558
virtual void MapBuffer(IBuffer *pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid &pMappedData) override final
Implementation of IDeviceContext::MapBuffer() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1281
virtual void DrawIndexedIndirect(const DrawIndexedIndirectAttribs &Attribs, IBuffer *pAttribsBuffer) override final
Implementation of IDeviceContext::DrawIndexedIndirect() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:894
#define DILIGENT_CALL_TYPE
Definition: CommonDefinitions.h:45
virtual void TraceRays(const TraceRaysAttribs &Attribs) override final
Implementation of IDeviceContext::TraceRays() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1578
virtual void SetIndexBuffer(IBuffer *pIndexBuffer, Uint32 ByteOffset, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final
Implementation of IDeviceContext::SetIndexBuffer() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:217
virtual void UpdateTexture(ITexture *pTexture, Uint32 MipLevel, Uint32 Slice, const Box &DstBox, const TextureSubResData &SubresData, RESOURCE_STATE_TRANSITION_MODE SrcBufferStateTransitionMode, RESOURCE_STATE_TRANSITION_MODE TextureStateTransitionMode) override final
Implementation of IDeviceContext::UpdateTexture() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1295
This structure is used by IDeviceContext::BuildTLAS().
Definition: DeviceContext.h:1082
Base implementation of a texture object in OpenGL backend.
Definition: TextureBaseGL.hpp:41
virtual void InvalidateState() override final
Implementation of IDeviceContext::InvalidateState() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:206
uint32_t Uint32
32-bit unsigned integer
Definition: BasicTypes.h:51
virtual void SetPipelineState(IPipelineState *pPipelineState) override final
Implementation of IDeviceContext::SetPipelineState() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:80
Defines the mesh indirect draw command attributes.
Definition: DeviceContext.h:402
Base implementation of the device context.
Definition: DeviceContextBase.hpp:107
Describes the viewport.
Definition: DeviceContext.h:593
Describes dispatch command arguments.
Definition: DeviceContext.h:500
virtual void CommitShaderResources(IShaderResourceBinding *pShaderResourceBinding, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final
Implementation of IDeviceContext::CommitShaderResources() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:168
virtual void TraceRaysIndirect(const TraceRaysIndirectAttribs &Attribs, IBuffer *pAttribsBuffer) override final
Implementation of IDeviceContext::TraceRaysIndirect() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1583
MEMORY_BARRIER
Definition: AsyncWritableResource.hpp:33
This structure is used by IDeviceContext::BuildBLAS().
Definition: DeviceContext.h:925
This structure is used by IDeviceContext::CopyBLAS().
Definition: DeviceContext.h:1159
Render device implementation in OpenGL backend.
Definition: RenderDeviceGLImpl.hpp:45
Buffer object implementation in OpenGL backend.
Definition: BufferGLImpl.hpp:41
void CommitRenderTargets()
Definition: DeviceContextGLImpl.cpp:333
virtual void FinishFrame() override final
Implementation of IDeviceContext::FinishFrame() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1100
virtual void SetRenderTargets(Uint32 NumRenderTargets, ITextureView *ppRenderTargets[], ITextureView *pDepthStencil, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final
Implementation of IDeviceContext::SetRenderTargets() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:386
Defines the indirect draw command attributes.
Definition: DeviceContext.h:291
virtual void SetSwapChain(ISwapChainGL *pSwapChain) override final
Definition: DeviceContextGLImpl.cpp:328
DRAW_FLAGS
Draw command flags.
Definition: DeviceContext.h:68
This structure is used by IDeviceContext::CopyTLAS().
Definition: DeviceContext.h:1188
Fence interface.
Definition: Fence.h:62
virtual void ClearRenderTarget(ITextureView *pView, const float *RGBA, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final
Implementation of IDeviceContext::ClearRenderTarget() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1042
Defines the indexed draw command attributes.
Definition: DeviceContext.h:224
virtual void SetVertexBuffers(Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer **ppBuffers, Uint32 *pOffsets, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode, SET_VERTEX_BUFFERS_FLAGS Flags) override final
Implementation of IDeviceContext::SetVertexBuffers() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:195
virtual void WaitForIdle() override final
Implementation of IDeviceContext::WaitForIdle() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1135
Definition: GLObjectWrapper.hpp:36
Query interface.
Definition: Query.h:177
virtual void DrawMesh(const DrawMeshAttribs &Attribs) override final
Implementation of IDeviceContext::DrawMesh() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:928
uint8_t Uint8
8-bit unsigned integer
Definition: BasicTypes.h:53
virtual void WriteBLASCompactedSize(const WriteBLASCompactedSizeAttribs &Attribs) override final
Implementation of IDeviceContext::WriteBLASCompactedSize() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1568
virtual void GenerateMips(ITextureView *pTexView) override
Implementation of IDeviceContext::GenerateMips() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1456
Definition: GLContextState.hpp:39
virtual void DrawIndexed(const DrawIndexedAttribs &Attribs) override final
Implementation of IDeviceContext::DrawIndexed() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:801
Describes the rectangle.
Definition: DeviceContext.h:642
virtual void ResolveTextureSubresource(ITexture *pSrcTexture, ITexture *pDstTexture, const ResolveTextureSubresourceAttribs &ResolveAttribs) override final
Implementation of IDeviceContext::ResolveTextureSubresource() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1472
Defines the draw command attributes.
Definition: DeviceContext.h:169
virtual void BeginRenderPass(const BeginRenderPassAttribs &Attribs) override final
Implementation of IDeviceContext::BeginRenderPass() in Direct3D11 backend.
Definition: DeviceContextGLImpl.cpp:598
virtual void EndRenderPass() override final
Implementation of IDeviceContext::EndRenderPass() in Direct3D11 backend.
Definition: DeviceContextGLImpl.cpp:621
virtual void QueryInterface(const INTERFACE_ID &IID, IObject **ppInterface) override final
Queries the specific interface, see IObject::QueryInterface() for details.
virtual void UnmapBuffer(IBuffer *pBuffer, MAP_TYPE MapType) override final
Implementation of IDeviceContext::UnmapBuffer() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1288
MAP_TYPE
Resource mapping type.
Definition: GraphicsTypes.h:206
Defines copy texture command attributes.
Definition: DeviceContext.h:672
virtual void FinishCommandList(class ICommandList **ppCommandList) override final
Implementation of IDeviceContext::FinishCommandList() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1105
virtual void BuildBLAS(const BuildBLASAttribs &Attribs) override final
Implementation of IDeviceContext::BuildBLAS() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1548
virtual bool UpdateCurrentGLContext() override final
Implementation of IDeviceContextGL::UpdateCurrentGLContext().
Definition: DeviceContextGLImpl.cpp:1244
virtual void NextSubpass() override final
Implementation of IDeviceContext::NextSubpass() in Direct3D11 backend.
Definition: DeviceContextGLImpl.cpp:613
Texture inteface.
Definition: Texture.h:273
GLContextState m_ContextState
Definition: DeviceContextGLImpl.hpp:285
@ MEMORY_BARRIER_NONE
Definition: AsyncWritableResource.hpp:35
virtual void SignalFence(IFence *pFence, Uint64 Value) override final
Implementation of IDeviceContext::SignalFence() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1116
virtual void SetBlendFactors(const float *pBlendFactors=nullptr) override final
Implementation of IDeviceContext::SetBlendFactors() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:187
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37
virtual void ResetRenderTargets() override final
Definition: DeviceContextGLImpl.cpp:416
Describes data for one subresource.
Definition: Texture.h:165
virtual void BeginQuery(IQuery *pQuery) override final
Implementation of IDeviceContext::BeginQuery() in OpenGL backend.
Definition: DeviceContextGLImpl.cpp:1142