summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-11-09 07:13:13 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-11-09 07:13:13 +0000
commit7632f568c61022e6715b433c348730af0217a27a (patch)
tree2961d476bfdbcc436bb9e8abee57209b65fcbbe5 /Graphics/GraphicsEngineOpenGL
parentUpdated descriptions of backend-specific interfaces (diff)
downloadDiligentCore-7632f568c61022e6715b433c348730af0217a27a.tar.gz
DiligentCore-7632f568c61022e6715b433c348730af0217a27a.zip
Updated method comments in OpenGL backend
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.h9
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h42
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/FenceGLImpl.h5
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.h8
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h12
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.h3
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h5
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/ShaderResourceBindingGLImpl.h7
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/SwapChainGLImpl.h11
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/Texture1DArray_OGL.h3
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/Texture1D_OGL.h5
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/Texture2DArray_OGL.h3
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/Texture2D_OGL.h3
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/Texture3D_OGL.h3
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h8
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/TextureCubeArray_OGL.h3
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/TextureCube_OGL.h3
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.h3
19 files changed, 120 insertions, 18 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.h
index a5b364d5..68e86954 100644
--- a/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.h
@@ -37,7 +37,7 @@ namespace Diligent
class FixedBlockMemoryAllocator;
-/// Implementation of the Diligent::IBufferGL interface
+/// Buffer object implementation in OpenGL backend.
class BufferGLImpl final : public BufferBase<IBufferGL, RenderDeviceGLImpl, BufferViewGLImpl, FixedBlockMemoryAllocator>, public AsyncWritableResource
{
public:
@@ -50,6 +50,7 @@ public:
const BufferDesc& BuffDesc,
const BufferData* pBuffData,
bool bIsDeviceInternal);
+
BufferGLImpl(IReferenceCounters* pRefCounters,
FixedBlockMemoryAllocator& BuffViewObjMemAllocator,
class RenderDeviceGLImpl* pDeviceGL,
@@ -57,6 +58,7 @@ public:
const BufferDesc& BuffDesc,
GLuint GLHandle,
bool bIsDeviceInternal);
+
~BufferGLImpl();
/// Queries the specific interface, see IObject::QueryInterface() for details
@@ -67,11 +69,14 @@ public:
void Map(GLContextState& CtxState, MAP_TYPE MapType, Uint32 MapFlags, PVoid& pMappedData );
void Unmap(GLContextState& CtxState);
- void BufferMemoryBarrier( Uint32 RequiredBarriers, class GLContextState &GLContextState );
+ void BufferMemoryBarrier( Uint32 RequiredBarriers, class GLContextState& GLContextState );
const GLObjectWrappers::GLBufferObj& GetGLHandle(){ return m_GlBuffer; }
+ /// Implementation of IBufferGL::GetGLBufferHandle().
virtual GLuint GetGLBufferHandle()override final { return GetGLHandle(); }
+
+ /// Implementation of IBuffer::GetNativeHandle() in OpenGL backend.
virtual void* GetNativeHandle()override final { return reinterpret_cast<void*>(static_cast<size_t>(GetGLBufferHandle())); }
private:
diff --git a/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.h
index bb834536..1e93c850 100644
--- a/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.h
@@ -39,7 +39,7 @@ class IDeviceContext;
class BufferGLImpl;
struct BufferViewDesc;
-/// Implementation of the Diligent::IBufferViewGL interface
+/// Buffer view implementation in OpenGL backend.
class BufferViewGLImpl final : public BufferViewBase<IBufferViewGL, RenderDeviceGLImpl>
{
public:
diff --git a/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h
index 65835fc4..7eb69f18 100644
--- a/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h
@@ -45,7 +45,7 @@ struct DeviceContextGLImplTraits
using DeviceType = RenderDeviceGLImpl;
};
-/// Implementation of the Diligent::IDeviceContextGL interface
+/// Device context implementation in OpenGL backend.
class DeviceContextGLImpl final : public DeviceContextBase<IDeviceContextGL, DeviceContextGLImplTraits>
{
public:
@@ -56,16 +56,22 @@ public:
/// Queries the specific interface, see IObject::QueryInterface() for details.
virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface )override final;
+ /// Implementation of IDeviceContext::SetPipelineState() in OpenGL backend.
virtual void SetPipelineState(IPipelineState* pPipelineState)override final;
+ /// Implementation of IDeviceContext::TransitionShaderResources() in OpenGL backend.
virtual void TransitionShaderResources(IPipelineState* pPipelineState, IShaderResourceBinding* pShaderResourceBinding)override final;
+ /// Implementation of IDeviceContext::CommitShaderResources() in OpenGL backend.
virtual void CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final;
+ /// Implementation of IDeviceContext::SetStencilRef() in OpenGL backend.
virtual void SetStencilRef(Uint32 StencilRef)override final;
+ /// Implementation of IDeviceContext::SetBlendFactors() in OpenGL backend.
virtual void SetBlendFactors(const float* pBlendFactors = nullptr)override final;
+ /// Implementation of IDeviceContext::SetVertexBuffers() in OpenGL backend.
virtual void SetVertexBuffers(Uint32 StartSlot,
Uint32 NumBuffersSet,
IBuffer** ppBuffers,
@@ -73,41 +79,56 @@ public:
RESOURCE_STATE_TRANSITION_MODE StateTransitionMode,
SET_VERTEX_BUFFERS_FLAGS Flags)override final;
+ /// Implementation of IDeviceContext::InvalidateState() in OpenGL backend.
virtual void InvalidateState()override final;
+ /// Implementation of IDeviceContext::SetIndexBuffer() in OpenGL backend.
virtual void SetIndexBuffer(IBuffer* pIndexBuffer, Uint32 ByteOffset, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final;
+ /// Implementation of IDeviceContext::SetViewports() in OpenGL backend.
virtual void SetViewports(Uint32 NumViewports, const Viewport* pViewports, Uint32 RTWidth, Uint32 RTHeight)override final;
+ /// Implementation of IDeviceContext::SetScissorRects() in OpenGL backend.
virtual void SetScissorRects(Uint32 NumRects, const Rect *pRects, Uint32 RTWidth, Uint32 RTHeight)override final;
+ /// Implementation of IDeviceContext::SetRenderTargets() in OpenGL backend.
virtual void SetRenderTargets(Uint32 NumRenderTargets,
ITextureView* ppRenderTargets[],
ITextureView* pDepthStencil,
RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final;
+ /// Implementation of IDeviceContext::Draw() in OpenGL backend.
virtual void Draw (const DrawAttribs& Attribs)override final;
+ /// Implementation of IDeviceContext::DrawIndexed() in OpenGL backend.
virtual void DrawIndexed (const DrawIndexedAttribs& Attribs)override final;
+ /// Implementation of IDeviceContext::DrawIndirect() in OpenGL backend.
virtual void DrawIndirect (const DrawIndirectAttribs& Attribs, IBuffer* pAttribsBuffer)override final;
+ /// Implementation of IDeviceContext::DrawIndexedIndirect() in OpenGL backend.
virtual void DrawIndexedIndirect(const DrawIndexedIndirectAttribs& Attribs, IBuffer* pAttribsBuffer)override final;
+ /// Implementation of IDeviceContext::DispatchCompute() in OpenGL backend.
virtual void DispatchCompute(const DispatchComputeAttribs& Attribs)override final;
+ /// Implementation of IDeviceContext::DispatchComputeIndirect() in OpenGL backend.
virtual void DispatchComputeIndirect(const DispatchComputeIndirectAttribs& Attribs, IBuffer* pAttribsBuffer)override final;
+ /// Implementation of IDeviceContext::ClearDepthStencil() in OpenGL backend.
virtual void ClearDepthStencil(ITextureView* pView,
CLEAR_DEPTH_STENCIL_FLAGS ClearFlags,
float fDepth,
Uint8 Stencil,
RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final;
+ /// Implementation of IDeviceContext::ClearRenderTarget() in OpenGL backend.
virtual void ClearRenderTarget(ITextureView* pView, const float* RGBA, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final;
+ /// Implementation of IDeviceContext::UpdateBuffer() in OpenGL backend.
virtual void UpdateBuffer(IBuffer* pBuffer,
Uint32 Offset,
Uint32 Size,
const PVoid pData,
RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final;
+ /// Implementation of IDeviceContext::CopyBuffer() in OpenGL backend.
virtual void CopyBuffer(IBuffer* pSrcBuffer,
Uint32 SrcOffset,
RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
@@ -116,10 +137,13 @@ public:
Uint32 Size,
RESOURCE_STATE_TRANSITION_MODE DstBufferTransitionMode)override final;
+ /// Implementation of IDeviceContext::MapBuffer() in OpenGL backend.
virtual void MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid& pMappedData)override final;
+ /// Implementation of IDeviceContext::UnmapBuffer() in OpenGL backend.
virtual void UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType)override final;
+ /// Implementation of IDeviceContext::UpdateTexture() in OpenGL backend.
virtual void UpdateTexture(ITexture* pTexture,
Uint32 MipLevel,
Uint32 Slice,
@@ -128,8 +152,10 @@ public:
RESOURCE_STATE_TRANSITION_MODE SrcBufferStateTransitionMode,
RESOURCE_STATE_TRANSITION_MODE TextureStateTransitionMode)override final;
+ /// Implementation of IDeviceContext::CopyTexture() in OpenGL backend.
virtual void CopyTexture(const CopyTextureAttribs& CopyAttribs)override final;
+ /// Implementation of IDeviceContext::MapTextureSubresource() in OpenGL backend.
virtual void MapTextureSubresource(ITexture* pTexture,
Uint32 MipLevel,
Uint32 ArraySlice,
@@ -138,29 +164,37 @@ public:
const Box* pMapRegion,
MappedTextureSubresource& MappedData)override final;
-
+ /// Implementation of IDeviceContext::UnmapTextureSubresource() in OpenGL backend.
virtual void UnmapTextureSubresource(ITexture* pTexture, Uint32 MipLevel, Uint32 ArraySlice)override final;
-
+ /// Implementation of IDeviceContext::GenerateMips() in OpenGL backend.
virtual void GenerateMips(ITextureView* pTexView)override;
-
+ /// Implementation of IDeviceContext::FinishFrame() in OpenGL backend.
virtual void FinishFrame()override final;
+ /// Implementation of IDeviceContext::TransitionResourceStates() in OpenGL backend.
virtual void TransitionResourceStates(Uint32 BarrierCount, StateTransitionDesc* pResourceBarriers)override final;
+ /// Implementation of IDeviceContext::FinishCommandList() in OpenGL backend.
virtual void FinishCommandList(class ICommandList** ppCommandList)override final;
+ /// Implementation of IDeviceContext::ExecuteCommandList() in OpenGL backend.
virtual void ExecuteCommandList(class ICommandList* pCommandList)override final;
+ /// Implementation of IDeviceContext::SignalFence() in OpenGL backend.
virtual void SignalFence(IFence* pFence, Uint64 Value)override final;
+ /// Implementation of IDeviceContext::WaitForFence() in OpenGL backend.
virtual void WaitForFence(IFence* pFence, Uint64 Value, bool FlushContext)override final;
+ /// Implementation of IDeviceContext::WaitForIdle() in OpenGL backend.
virtual void WaitForIdle()override final;
+ /// Implementation of IDeviceContext::Flush() in OpenGL backend.
virtual void Flush()override final;
+ /// Implementation of IDeviceContextGL::UpdateCurrentGLContext().
virtual bool UpdateCurrentGLContext()override final;
void BindProgramResources(Uint32& NewMemoryBarriers, IShaderResourceBinding* pResBinding);
diff --git a/Graphics/GraphicsEngineOpenGL/include/FenceGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/FenceGLImpl.h
index f3de469f..5c9dcd4e 100644
--- a/Graphics/GraphicsEngineOpenGL/include/FenceGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/FenceGLImpl.h
@@ -38,7 +38,7 @@ namespace Diligent
class FixedBlockMemoryAllocator;
-/// Implementation of the Diligent::IFenceGL interface
+/// Fence object implementation in OpenGL backend.
class FenceGLImpl final : public FenceBase<IFenceGL, RenderDeviceGLImpl>
{
public:
@@ -49,9 +49,10 @@ public:
const FenceDesc& Desc);
~FenceGLImpl();
+ /// Implementation of IFence::GetCompletedValue() in OpenGL backend.
virtual Uint64 GetCompletedValue()override final;
- /// Resets the fence to the specified value.
+ /// Implementation of IFence::Reset() in OpenGL backend.
virtual void Reset(Uint64 Value)override final;
void AddPendingFence(GLObjectWrappers::GLSyncObj&& Fence, Uint64 Value)
diff --git a/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.h
index 6bf79f0c..8cf7c8e0 100644
--- a/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.h
@@ -39,7 +39,7 @@ namespace Diligent
class FixedBlockMemoryAllocator;
-/// Implementation of the Diligent::IPipelineStateGL interface
+/// Pipeline state object implementation in OpenGL backend.
class PipelineStateGLImpl final : public PipelineStateBase<IPipelineStateGL, RenderDeviceGLImpl>
{
public:
@@ -54,16 +54,22 @@ public:
/// Queries the specific interface, see IObject::QueryInterface() for details
virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface)override;
+ /// Implementation of IPipelineState::BindStaticResources() in OpenGL backend.
virtual void BindStaticResources(Uint32 ShaderFlags, IResourceMapping* pResourceMapping, Uint32 Flags)override final;
+ /// Implementation of IPipelineState::GetStaticVariableCount() in OpenGL backend.
virtual Uint32 GetStaticVariableCount(SHADER_TYPE ShaderType) const override final;
+ /// Implementation of IPipelineState::GetStaticVariableByName() in OpenGL backend.
virtual IShaderResourceVariable* GetStaticVariableByName(SHADER_TYPE ShaderType, const Char* Name) override final;
+ /// Implementation of IPipelineState::GetStaticVariableByIndex() in OpenGL backend.
virtual IShaderResourceVariable* GetStaticVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index) override final;
+ /// Implementation of IPipelineState::CreateShaderResourceBinding() in OpenGL backend.
virtual void CreateShaderResourceBinding( IShaderResourceBinding** ppShaderResourceBinding, bool InitStaticResources )override final;
+ /// Implementation of IPipelineState::IsCompatibleWith() in OpenGL backend.
virtual bool IsCompatibleWith(const IPipelineState* pPSO)const override final;
void CommitProgram(GLContextState& State);
diff --git a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h
index 6df86c96..234a1c73 100644
--- a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h
@@ -48,7 +48,7 @@ struct GPUInfo
namespace Diligent
{
-/// Implementation of the render device interface in OpenGL
+/// Render device implementation in OpenGL backend.
// RenderDeviceGLESImpl is inherited from RenderDeviceGLImpl
class RenderDeviceGLImpl : public RenderDeviceBase<IGLDeviceBaseInterface>
{
@@ -63,29 +63,39 @@ public:
~RenderDeviceGLImpl();
virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface)override;
+ /// Implementation of IRenderDevice::CreateBuffer() in OpenGL backend.
void CreateBuffer(const BufferDesc& BuffDesc, const BufferData* pBuffData, IBuffer** ppBufferLayout, bool bIsDeviceInternal);
virtual void CreateBuffer(const BufferDesc& BuffDesc, const BufferData* BuffData, IBuffer** ppBufferLayout)override final;
+ /// Implementation of IRenderDevice::CreateShader() in OpenGL backend.
void CreateShader(const ShaderCreateInfo& ShaderCreateInfo, IShader **ppShader, bool bIsDeviceInternal );
virtual void CreateShader(const ShaderCreateInfo& ShaderCreateInfo, IShader **ppShader)override final;
+ /// Implementation of IRenderDevice::CreateTexture() in OpenGL backend.
void CreateTexture(const TextureDesc& TexDesc, const TextureData* pData, ITexture** ppTexture, bool bIsDeviceInternal);
virtual void CreateTexture(const TextureDesc& TexDesc, const TextureData* Data, ITexture** ppTexture)override final;
+ /// Implementation of IRenderDevice::CreateSampler() in OpenGL backend.
void CreateSampler(const SamplerDesc& SamplerDesc, ISampler** ppSampler, bool bIsDeviceInternal);
virtual void CreateSampler(const SamplerDesc& SamplerDesc, ISampler** ppSampler)override final;
+ /// Implementation of IRenderDevice::CreatePipelineState() in OpenGL backend.
void CreatePipelineState( const PipelineStateDesc& PipelineDesc, IPipelineState** ppPipelineState, bool bIsDeviceInternal);
virtual void CreatePipelineState( const PipelineStateDesc& PipelineDesc, IPipelineState** ppPipelineState )override final;
+ /// Implementation of IRenderDevice::CreateFence() in OpenGL backend.
virtual void CreateFence(const FenceDesc& Desc, IFence** ppFence)override final;
+ /// Implementation of IRenderDeviceGL::CreateTextureFromGLHandle().
virtual void CreateTextureFromGLHandle(Uint32 GLHandle, const TextureDesc& TexDesc, RESOURCE_STATE InitialState, ITexture** ppTexture)override final;
+ /// Implementation of IRenderDeviceGL::CreateBufferFromGLHandle().
virtual void CreateBufferFromGLHandle(Uint32 GLHandle, const BufferDesc& BuffDesc, RESOURCE_STATE InitialState, IBuffer** ppBuffer)override final;
+ /// Implementation of IRenderDevice::ReleaseStaleResources() in OpenGL backend.
virtual void ReleaseStaleResources(bool ForceRelease = false)override final {}
+ /// Implementation of IRenderDevice::IdleGPU() in OpenGL backend.
virtual void IdleGPU()override final;
const GPUInfo& GetGPUInfo(){ return m_GPUInfo; }
diff --git a/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.h
index 4cc715ec..ad096bbf 100644
--- a/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.h
@@ -34,7 +34,8 @@ namespace Diligent
{
class FixedBlockMemoryAllocator;
-/// Implementation of the Diligent::ISamplerGL interface
+
+/// Sampler implementation in OpenGL backend.
class SamplerGLImpl final : public SamplerBase<ISamplerGL, RenderDeviceGLImpl>
{
public:
diff --git a/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h
index 53a01a85..900ce86f 100644
--- a/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h
@@ -64,7 +64,7 @@ inline GLenum ShaderTypeToGLShaderBit(SHADER_TYPE ShaderType)
}
}
-/// Implementation of the Diligent::IShaderGL interface
+/// Shader object implementation in OpenGL backend.
class ShaderGLImpl final : public ShaderBase<IShaderGL, RenderDeviceGLImpl>
{
public:
@@ -78,7 +78,10 @@ public:
virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface)override final;
+ /// Implementation of IShader::GetResourceCount() in OpenGL backend.
virtual Uint32 GetResourceCount()const override final;
+
+ /// Implementation of IShader::GetResource() in OpenGL backend.
virtual ShaderResourceDesc GetResource(Uint32 Index)const override final;
static GLObjectWrappers::GLProgramObj LinkProgram(IShader** ppShaders, Uint32 NumShaders, bool IsSeparableProgram);
diff --git a/Graphics/GraphicsEngineOpenGL/include/ShaderResourceBindingGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/ShaderResourceBindingGLImpl.h
index e53d5109..82110c44 100644
--- a/Graphics/GraphicsEngineOpenGL/include/ShaderResourceBindingGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/ShaderResourceBindingGLImpl.h
@@ -40,7 +40,7 @@ namespace Diligent
class FixedBlockMemoryAllocator;
class PipelineStateGLImpl;
-/// Implementation of the Diligent::IShaderResourceBindingGL interface
+/// Shader resource binding object implementation in OpenGL backend.
class ShaderResourceBindingGLImpl final : public ShaderResourceBindingBase<IShaderResourceBindingGL>
{
public:
@@ -54,14 +54,19 @@ public:
virtual void QueryInterface( const INTERFACE_ID& IID, IObject** ppInterface )override final;
+ /// Implementation of IShaderResourceBinding::BindResources() in OpenGL backend.
virtual void BindResources(Uint32 ShaderFlags, IResourceMapping* pResMapping, Uint32 Flags)override final;
+ /// Implementation of IShaderResourceBinding::GetVariableByName() in OpenGL backend.
virtual IShaderResourceVariable* GetVariableByName(SHADER_TYPE ShaderType, const char *Name)override final;
+ /// Implementation of IShaderResourceBinding::GetVariableCount() in OpenGL backend.
virtual Uint32 GetVariableCount(SHADER_TYPE ShaderType) const override final;
+ /// Implementation of IShaderResourceBinding::GetVariableByIndex() in OpenGL backend.
virtual IShaderResourceVariable* GetVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index)override final;
+ /// Implementation of IShaderResourceBinding::InitializeStaticResources() in OpenGL backend.
virtual void InitializeStaticResources(const IPipelineState* pPipelineState)override final;
const GLProgramResourceCache& GetResourceCache(PipelineStateGLImpl* pdbgPSO);
diff --git a/Graphics/GraphicsEngineOpenGL/include/SwapChainGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/SwapChainGLImpl.h
index a3c3e176..0479e43b 100644
--- a/Graphics/GraphicsEngineOpenGL/include/SwapChainGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/SwapChainGLImpl.h
@@ -31,7 +31,8 @@ namespace Diligent
{
class IMemoryAllocator;
-/// Implementation of the Diligent::ISwapChainGL interface
+
+/// Swap chain implementation in OpenGL backend.
class SwapChainGLImpl final : public SwapChainBase<ISwapChainGL>
{
public:
@@ -46,17 +47,25 @@ public:
virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface )override final;
+ /// Implementation of ISwapChain::Present() in OpenGL backend.
virtual void Present(Uint32 SyncInterval)override final;
+ /// Implementation of ISwapChain::Resize() in OpenGL backend.
virtual void Resize( Uint32 NewWidth, Uint32 NewHeight )override final;
+ /// Implementation of ISwapChain::SetFullscreenMode() in OpenGL backend.
virtual void SetFullscreenMode(const DisplayModeAttribs& DisplayMode)override final;
+ /// Implementation of ISwapChain::SetWindowedMode() in OpenGL backend.
virtual void SetWindowedMode()override final;
+ /// Implementation of ISwapChainGL::GetDefaultFBO().
virtual GLuint GetDefaultFBO()const override final{ return 0; }
+ /// Implementation of ISwapChain::GetCurrentBackBufferRTV() in OpenGL backend.
virtual ITextureView* GetCurrentBackBufferRTV()override final{return nullptr;}
+
+ /// Implementation of ISwapChain::GetDepthBufferDSV() in OpenGL backend.
virtual ITextureView* GetDepthBufferDSV()override final{return nullptr;}
};
diff --git a/Graphics/GraphicsEngineOpenGL/include/Texture1DArray_OGL.h b/Graphics/GraphicsEngineOpenGL/include/Texture1DArray_OGL.h
index ddbc4148..06b90fb2 100644
--- a/Graphics/GraphicsEngineOpenGL/include/Texture1DArray_OGL.h
+++ b/Graphics/GraphicsEngineOpenGL/include/Texture1DArray_OGL.h
@@ -28,6 +28,7 @@
namespace Diligent
{
+/// 1D texture array implementation in OpenGL backend.
class Texture1DArray_OGL final : public TextureBaseGL
{
public:
@@ -48,12 +49,14 @@ public:
bool bIsDeviceInternal = false);
~Texture1DArray_OGL();
+ /// Implementation of TextureBaseGL::UpdateData() for 1D texture array.
virtual void UpdateData( class GLContextState& CtxState,
Uint32 MipLevel,
Uint32 Slice,
const Box& DstBox,
const TextureSubResData& SubresData )override final;
+ /// Implementation of TextureBaseGL::AttachToFramebuffer() for 1D texture array.
virtual void AttachToFramebuffer( const struct TextureViewDesc& ViewDesc,
GLenum AttachmentPoint )override final;
};
diff --git a/Graphics/GraphicsEngineOpenGL/include/Texture1D_OGL.h b/Graphics/GraphicsEngineOpenGL/include/Texture1D_OGL.h
index 488c62db..d08704eb 100644
--- a/Graphics/GraphicsEngineOpenGL/include/Texture1D_OGL.h
+++ b/Graphics/GraphicsEngineOpenGL/include/Texture1D_OGL.h
@@ -28,6 +28,7 @@
namespace Diligent
{
+/// 1D texture implementation in OpenGL backend.
class Texture1D_OGL final : public TextureBaseGL
{
public:
@@ -48,12 +49,14 @@ public:
bool bIsDeviceInternal = false);
~Texture1D_OGL();
- virtual void UpdateData( class GLContextState& CtxState,
+ /// Implementation of TextureBaseGL::UpdateData() for 1D texture.
+ virtual void UpdateData( class GLContextState& CtxState,
Uint32 MipLevel,
Uint32 Slice,
const Box& DstBox,
const TextureSubResData& SubresData )override final;
+ /// Implementation of TextureBaseGL::AttachToFramebuffer() for 1D texture.
virtual void AttachToFramebuffer( const struct TextureViewDesc& ViewDesc,
GLenum AttachmentPoint )override final;
};
diff --git a/Graphics/GraphicsEngineOpenGL/include/Texture2DArray_OGL.h b/Graphics/GraphicsEngineOpenGL/include/Texture2DArray_OGL.h
index 9c9e5a0d..1acfc7e6 100644
--- a/Graphics/GraphicsEngineOpenGL/include/Texture2DArray_OGL.h
+++ b/Graphics/GraphicsEngineOpenGL/include/Texture2DArray_OGL.h
@@ -28,6 +28,7 @@
namespace Diligent
{
+/// 2D texture array implementation in OpenGL backend.
class Texture2DArray_OGL final : public TextureBaseGL
{
public:
@@ -48,12 +49,14 @@ public:
bool bIsDeviceInternal = false);
~Texture2DArray_OGL();
+ /// Implementation of TextureBaseGL::UpdateData() for 2D texture array.
virtual void UpdateData(class GLContextState& CtxState,
Uint32 MipLevel,
Uint32 Slice,
const Box& DstBox,
const TextureSubResData& SubresData)override final;
+ /// Implementation of TextureBaseGL::AttachToFramebuffer() for 2D texture array.
virtual void AttachToFramebuffer( const struct TextureViewDesc& ViewDesc,
GLenum AttachmentPoint )override final;
};
diff --git a/Graphics/GraphicsEngineOpenGL/include/Texture2D_OGL.h b/Graphics/GraphicsEngineOpenGL/include/Texture2D_OGL.h
index 8e54b368..c74446c2 100644
--- a/Graphics/GraphicsEngineOpenGL/include/Texture2D_OGL.h
+++ b/Graphics/GraphicsEngineOpenGL/include/Texture2D_OGL.h
@@ -28,6 +28,7 @@
namespace Diligent
{
+/// 2D texture implementation in OpenGL backend.
class Texture2D_OGL final : public TextureBaseGL
{
public:
@@ -48,12 +49,14 @@ public:
bool bIsDeviceInternal = false);
~Texture2D_OGL();
+ /// Implementation of TextureBaseGL::UpdateData() for 2D texture.
virtual void UpdateData( class GLContextState& CtxState,
Uint32 MipLevel,
Uint32 Slice,
const Box& DstBox,
const TextureSubResData& SubresData )override final;
+ /// Implementation of TextureBaseGL::AttachToFramebuffer() for 2D texture.
virtual void AttachToFramebuffer( const struct TextureViewDesc& ViewDesc,
GLenum AttachmentPoint )override final;
};
diff --git a/Graphics/GraphicsEngineOpenGL/include/Texture3D_OGL.h b/Graphics/GraphicsEngineOpenGL/include/Texture3D_OGL.h
index fbe61ae2..4d00e365 100644
--- a/Graphics/GraphicsEngineOpenGL/include/Texture3D_OGL.h
+++ b/Graphics/GraphicsEngineOpenGL/include/Texture3D_OGL.h
@@ -28,6 +28,7 @@
namespace Diligent
{
+/// 3D texture implementation in OpenGL backend.
class Texture3D_OGL final : public TextureBaseGL
{
public:
@@ -48,12 +49,14 @@ public:
bool bIsDeviceInternal = false);
~Texture3D_OGL();
+ /// Implementation of TextureBaseGL::UpdateData() for 3D texture.
virtual void UpdateData(class GLContextState& CtxState,
Uint32 MipLevel,
Uint32 Slice,
const Box& DstBox,
const TextureSubResData& SubresData)override final;
+ /// Implementation of TextureBaseGL::AttachToFramebuffer() for 3D texture.
virtual void AttachToFramebuffer( const struct TextureViewDesc& ViewDesc,
GLenum AttachmentPoint )override final;
};
diff --git a/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h b/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h
index 81da6554..7d7215ee 100644
--- a/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h
+++ b/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h
@@ -37,7 +37,7 @@ namespace Diligent
class FixedBlockMemoryAllocator;
-/// Base implementation of the Diligent::ITextureGL interface
+/// Base implementation of a texture object in OpenGL backend.
class TextureBaseGL : public TextureBase<ITextureGL, RenderDeviceGLImpl, TextureViewGLImpl, FixedBlockMemoryAllocator>, public AsyncWritableResource
{
public:
@@ -66,7 +66,10 @@ public:
virtual void QueryInterface( const INTERFACE_ID& IID, IObject** ppInterface )override;
const GLObjectWrappers::GLTextureObj& GetGLHandle()const{ return m_GlTexture; }
+
+ /// Implementation of ITextureGL::GetBindTarget().
virtual GLenum GetBindTarget()const override final{return m_BindTarget;}
+
GLenum GetGLTexFormat()const{ return m_GLTexFormat; }
void TextureMemoryBarrier( Uint32 RequiredBarriers, class GLContextState &GLContextState);
@@ -84,7 +87,10 @@ public:
Uint32 DstY,
Uint32 DstZ);
+ /// Implementation of ITextureGL::GetGLTextureHandle().
virtual GLuint GetGLTextureHandle()override final { return GetGLHandle(); }
+
+ /// Implementation of ITexture::GetNativeHandle() in OpenGL backend.
virtual void* GetNativeHandle()override final { return reinterpret_cast<void*>(static_cast<size_t>(GetGLTextureHandle())); }
virtual void UpdateData( class GLContextState& CtxState, Uint32 MipLevel, Uint32 Slice, const Box& DstBox, const TextureSubResData& SubresData ) = 0;
diff --git a/Graphics/GraphicsEngineOpenGL/include/TextureCubeArray_OGL.h b/Graphics/GraphicsEngineOpenGL/include/TextureCubeArray_OGL.h
index b2c3217f..3e4042cb 100644
--- a/Graphics/GraphicsEngineOpenGL/include/TextureCubeArray_OGL.h
+++ b/Graphics/GraphicsEngineOpenGL/include/TextureCubeArray_OGL.h
@@ -28,6 +28,7 @@
namespace Diligent
{
+/// Cube array texture implementation in OpenGL backend.
class TextureCubeArray_OGL final : public TextureBaseGL
{
public:
@@ -48,12 +49,14 @@ public:
bool bIsDeviceInternal = false);
~TextureCubeArray_OGL();
+ /// Implementation of TextureBaseGL::UpdateData() for cube texture array.
virtual void UpdateData(class GLContextState& CtxState,
Uint32 MipLevel,
Uint32 Slice,
const Box& DstBox,
const TextureSubResData& SubresData)override final;
+ /// Implementation of TextureBaseGL::AttachToFramebuffer() for cube texture array.
virtual void AttachToFramebuffer( const struct TextureViewDesc& ViewDesc,
GLenum AttachmentPoint )override final;
};
diff --git a/Graphics/GraphicsEngineOpenGL/include/TextureCube_OGL.h b/Graphics/GraphicsEngineOpenGL/include/TextureCube_OGL.h
index 8e85ec0c..9836ad56 100644
--- a/Graphics/GraphicsEngineOpenGL/include/TextureCube_OGL.h
+++ b/Graphics/GraphicsEngineOpenGL/include/TextureCube_OGL.h
@@ -28,6 +28,7 @@
namespace Diligent
{
+/// Cube texture implementation in OpenGL backend.
class TextureCube_OGL final : public TextureBaseGL
{
public:
@@ -48,12 +49,14 @@ public:
bool bIsDeviceInternal = false);
~TextureCube_OGL();
+ /// Implementation of TextureBaseGL::UpdateData() for cube texture.
virtual void UpdateData(class GLContextState& CtxState,
Uint32 MipLevel,
Uint32 Slice,
const Box& DstBox,
const TextureSubResData& SubresData)override final;
+ /// Implementation of TextureBaseGL::AttachToFramebuffer() for cube texture.
virtual void AttachToFramebuffer(const struct TextureViewDesc& ViewDesc,
GLenum AttachmentPoint)override final;
};
diff --git a/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.h
index 36833e40..c60c00c7 100644
--- a/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.h
@@ -34,7 +34,8 @@ namespace Diligent
{
class FixedBlockMemoryAllocator;
-/// Implementation of the Diligent::ITextureViewGL interface
+
+/// Texture view implementation in OpenGL backend.
class TextureViewGLImpl final : public TextureViewBase<ITextureViewGL, RenderDeviceGLImpl>
{
public: