diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-01-26 06:31:42 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-01-26 06:31:42 +0000 |
| commit | 6866e442b789df5c15693c2d38ae6abc740c5bd2 (patch) | |
| tree | 883c4cc8d9fa394ba0cda3a850145662b7bf53a6 /Graphics/GraphicsEngineOpenGL | |
| parent | Reworked IShaderResourceVariable::GetResourceDesc() method to be compatible w... (diff) | |
| download | DiligentCore-6866e442b789df5c15693c2d38ae6abc740c5bd2.tar.gz DiligentCore-6866e442b789df5c15693c2d38ae6abc740c5bd2.zip | |
Reworked IShader::GetResource to be compatible with C; renamed the method to GetResourceDesc
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h | 2 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h index 760c3c04..a2528381 100644 --- a/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h +++ b/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h @@ -90,7 +90,7 @@ public: virtual Uint32 GetResourceCount() const override final; /// Implementation of IShader::GetResource() in OpenGL backend. - virtual ShaderResourceDesc GetResource(Uint32 Index) const override final; + virtual void GetResourceDesc(Uint32 Index, ShaderResourceDesc& ResourceDesc) const override final; static GLObjectWrappers::GLProgramObj LinkProgram(IShader** ppShaders, Uint32 NumShaders, bool IsSeparableProgram); diff --git a/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp index 0479e80f..8a38bf01 100644 --- a/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp @@ -221,9 +221,8 @@ Uint32 ShaderGLImpl::GetResourceCount() const } } -ShaderResourceDesc ShaderGLImpl::GetResource(Uint32 Index) const +void ShaderGLImpl::GetResourceDesc(Uint32 Index, ShaderResourceDesc& ResourceDesc) const { - ShaderResourceDesc ResourceDesc; if (m_pDevice->GetDeviceCaps().Features.SeparablePrograms) { DEV_CHECK_ERR(Index < GetResourceCount(), "Index is out of range"); @@ -233,7 +232,6 @@ ShaderResourceDesc ShaderGLImpl::GetResource(Uint32 Index) const { LOG_WARNING_MESSAGE("Shader resource queries are not available when separate shader objects are unsupported"); } - return ResourceDesc; } } // namespace Diligent |
