summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2017-12-28 05:45:08 +0000
committerEgor Yusov <egor.yusov@gmail.com>2017-12-28 05:45:08 +0000
commit5cf012cfbc7017b46912b9f59a9f76a2d4b870b3 (patch)
tree911054514a37c26a82cb4152bf04fcf148d9556b /Graphics/GraphicsEngineOpenGL
parentRemoved legacy visual studio project and solution files (diff)
downloadDiligentCore-5cf012cfbc7017b46912b9f59a9f76a2d4b870b3.tar.gz
DiligentCore-5cf012cfbc7017b46912b9f59a9f76a2d4b870b3.zip
Reworked Common and Platform modules to break interdependenices;
Replaced static const->static constexpr where appropriate
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/CMakeLists.txt1
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/BufferGL.h4
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/BufferViewGL.h4
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h4
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/PipelineStateGL.h4
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/SamplerGL.h4
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/ShaderGL.h4
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/ShaderResourceBindingGL.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h4
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/TextureGL.h4
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/TextureViewGL.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp4
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp36
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/GLContextState.cpp2
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/GLContextWindows.cpp10
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/GLProgramResources.cpp10
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/TexRegionRender.cpp2
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp14
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/TextureCubeArray_OGL.cpp2
22 files changed, 62 insertions, 61 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
index adf556b2..c777d97a 100644
--- a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
+++ b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
@@ -14,6 +14,7 @@ set(INCLUDE
include/GLProgram.h
include/GLProgramResources.h
include/GLTypeConversions.h
+ include/pch.h
include/PipelineStateGLImpl.h
include/RenderDeviceGLImpl.h
include/SamplerGLImpl.h
diff --git a/Graphics/GraphicsEngineOpenGL/interface/BufferGL.h b/Graphics/GraphicsEngineOpenGL/interface/BufferGL.h
index eef72890..44b1bde5 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/BufferGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/BufferGL.h
@@ -32,11 +32,11 @@ namespace Diligent
{
// {08DF7319-F425-4EC7-8D2B-1B3FC0BDDBB4}
-static const Diligent::INTERFACE_ID IID_BufferGL =
+static constexpr INTERFACE_ID IID_BufferGL =
{ 0x8df7319, 0xf425, 0x4ec7, { 0x8d, 0x2b, 0x1b, 0x3f, 0xc0, 0xbd, 0xdb, 0xb4 } };
/// Interface to the buffer object implemented in OpenGL
-class IBufferGL : public Diligent::IBuffer
+class IBufferGL : public IBuffer
{
public:
/// Returns OpenGL buffer handle
diff --git a/Graphics/GraphicsEngineOpenGL/interface/BufferViewGL.h b/Graphics/GraphicsEngineOpenGL/interface/BufferViewGL.h
index 5ce9757d..593d21ea 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/BufferViewGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/BufferViewGL.h
@@ -32,11 +32,11 @@ namespace Diligent
{
// {927A865B-3CEB-4743-9A22-2A1397A73E6D}
-static const Diligent::INTERFACE_ID IID_BufferViewGL =
+static constexpr INTERFACE_ID IID_BufferViewGL =
{ 0x927a865b, 0x3ceb, 0x4743, { 0x9a, 0x22, 0x2a, 0x13, 0x97, 0xa7, 0x3e, 0x6d } };
/// Interface to the buffer view object implemented in OpenGL
-class IBufferViewGL : public Diligent::IBufferView
+class IBufferViewGL : public IBufferView
{
public:
//const GLObjectWrappers::GLTextureObj& GetTexBufferHandle(){ return m_GLTexBuffer; }
diff --git a/Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h b/Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h
index d2739503..db0af845 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h
@@ -32,11 +32,11 @@ namespace Diligent
{
// {3464FDF1-C548-4935-96C3-B454C9DF6F6A}
-static const Diligent::INTERFACE_ID IID_DeviceContextGL =
+static constexpr INTERFACE_ID IID_DeviceContextGL =
{ 0x3464fdf1, 0xc548, 0x4935, { 0x96, 0xc3, 0xb4, 0x54, 0xc9, 0xdf, 0x6f, 0x6a } };
/// Interface to the device context object implemented in OpenGL
-class IDeviceContextGL : public Diligent::IDeviceContext
+class IDeviceContextGL : public IDeviceContext
{
public:
diff --git a/Graphics/GraphicsEngineOpenGL/interface/PipelineStateGL.h b/Graphics/GraphicsEngineOpenGL/interface/PipelineStateGL.h
index b58c086b..6aea5768 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/PipelineStateGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/PipelineStateGL.h
@@ -32,12 +32,12 @@ namespace Diligent
{
// {80666BE3-318A-4403-AEE1-6E61A5B7A0F9}
-static const Diligent::INTERFACE_ID IID_PipelineStateGL =
+static constexpr INTERFACE_ID IID_PipelineStateGL =
{ 0x80666be3, 0x318a, 0x4403, { 0xae, 0xe1, 0x6e, 0x61, 0xa5, 0xb7, 0xa0, 0xf9 } };
/// Interface to the PipelineState object implemented in OpenGL
-class IPipelineStateGL : public Diligent::IPipelineState
+class IPipelineStateGL : public IPipelineState
{
};
diff --git a/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h b/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h
index 42e2c979..57b05b1a 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h
@@ -34,7 +34,7 @@ namespace Diligent
{
// {B4B395B9-AC99-4E8A-B7E1-9DCA0D485618}
-static const Diligent::INTERFACE_ID IID_RenderDeviceGL =
+static constexpr INTERFACE_ID IID_RenderDeviceGL =
{ 0xb4b395b9, 0xac99, 0x4e8a, { 0xb7, 0xe1, 0x9d, 0xca, 0xd, 0x48, 0x56, 0x18 } };
/// Interface to the render device object implemented in OpenGL
diff --git a/Graphics/GraphicsEngineOpenGL/interface/SamplerGL.h b/Graphics/GraphicsEngineOpenGL/interface/SamplerGL.h
index acd33216..b8623c1b 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/SamplerGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/SamplerGL.h
@@ -32,11 +32,11 @@ namespace Diligent
{
// {3E9EB89E-E955-447A-9D13-92C10541F727}
-static const Diligent::INTERFACE_ID IID_SamplerGL =
+static constexpr INTERFACE_ID IID_SamplerGL =
{ 0x3e9eb89e, 0xe955, 0x447a, { 0x9d, 0x13, 0x92, 0xc1, 0x5, 0x41, 0xf7, 0x27 } };
/// Interface to the sampler object object implemented in OpenGL
-class ISamplerGL : public Diligent::ISampler
+class ISamplerGL : public ISampler
{
public:
//const GLObjectWrappers::GLSamplerObj& GetHandle(){ return m_GlSampler; }
diff --git a/Graphics/GraphicsEngineOpenGL/interface/ShaderGL.h b/Graphics/GraphicsEngineOpenGL/interface/ShaderGL.h
index ccde049a..4482669d 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/ShaderGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/ShaderGL.h
@@ -32,11 +32,11 @@ namespace Diligent
{
// {2FF3C191-285B-4E6C-BD0B-D084DDEA6FCC}
-static const Diligent::INTERFACE_ID IID_ShaderGL =
+static constexpr INTERFACE_ID IID_ShaderGL =
{ 0x2ff3c191, 0x285b, 0x4e6c, { 0xbd, 0xb, 0xd0, 0x84, 0xdd, 0xea, 0x6f, 0xcc } };
/// Interface to the shader object implemented in OpenGL
-class IShaderGL : public Diligent::IShader
+class IShaderGL : public IShader
{
public:
diff --git a/Graphics/GraphicsEngineOpenGL/interface/ShaderResourceBindingGL.h b/Graphics/GraphicsEngineOpenGL/interface/ShaderResourceBindingGL.h
index ab920b54..f59a7ec6 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/ShaderResourceBindingGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/ShaderResourceBindingGL.h
@@ -32,7 +32,7 @@ namespace Diligent
{
// {41DB0329-B6D2-4470-9A58-D44CF4695FC6}
-static const Diligent::INTERFACE_ID IID_ShaderResourceBindingGL =
+static constexpr INTERFACE_ID IID_ShaderResourceBindingGL =
{ 0x41db0329, 0xb6d2, 0x4470, { 0x9a, 0x58, 0xd4, 0x4c, 0xf4, 0x69, 0x5f, 0xc6 } };
/// Shader resource binding interface
diff --git a/Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h b/Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h
index 1b12865a..9526d731 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h
@@ -32,11 +32,11 @@ namespace Diligent
{
// {F457BD7C-E725-4D3E-8607-A1F9BAE329EB}
-static const Diligent::INTERFACE_ID IID_SwapChainGL =
+static constexpr INTERFACE_ID IID_SwapChainGL =
{ 0xf457bd7c, 0xe725, 0x4d3e, { 0x86, 0x7, 0xa1, 0xf9, 0xba, 0xe3, 0x29, 0xeb } };
/// Interface to the swap chain object implemented in OpenGL
-class ISwapChainGL : public Diligent::ISwapChain
+class ISwapChainGL : public ISwapChain
{
public:
};
diff --git a/Graphics/GraphicsEngineOpenGL/interface/TextureGL.h b/Graphics/GraphicsEngineOpenGL/interface/TextureGL.h
index 091e0173..b5752469 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/TextureGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/TextureGL.h
@@ -32,11 +32,11 @@ namespace Diligent
{
// {D7BC9FF0-28F0-4636-9732-710C204D1D63}
-static const Diligent::INTERFACE_ID IID_TextureGL =
+static constexpr INTERFACE_ID IID_TextureGL =
{ 0xd7bc9ff0, 0x28f0, 0x4636, { 0x97, 0x32, 0x71, 0xc, 0x20, 0x4d, 0x1d, 0x63 } };
/// Interface to the texture object implemented in OpenGL
-class ITextureGL : public Diligent::ITexture
+class ITextureGL : public ITexture
{
public:
/// Returns OpenGL texture handle
diff --git a/Graphics/GraphicsEngineOpenGL/interface/TextureViewGL.h b/Graphics/GraphicsEngineOpenGL/interface/TextureViewGL.h
index 2e5879d0..bfd5b395 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/TextureViewGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/TextureViewGL.h
@@ -32,7 +32,7 @@ namespace Diligent
{
// {15F93272-6135-414F-AB10-53FF9A5004AD}
-static const Diligent::INTERFACE_ID IID_TextureViewGL =
+static constexpr INTERFACE_ID IID_TextureViewGL =
{ 0x15f93272, 0x6135, 0x414f, { 0xab, 0x10, 0x53, 0xff, 0x9a, 0x50, 0x4, 0xad } };
/// Interface to the texture view object implemented in OpenGL
diff --git a/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp
index 66bc697d..de6ab113 100644
--- a/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp
@@ -142,7 +142,7 @@ static BufferDesc GetBufferDescFromGLHandle(BufferDesc BuffDesc, GLuint BufferHa
CHECK_GL_ERROR("glGetBufferParameteriv() failed");
VERIFY_EXPR(BufferSize > 0);
- VERIFY(BuffDesc.uiSizeInBytes == 0 || BuffDesc.uiSizeInBytes == static_cast<Uint32>(BufferSize), "Buffer size specified by the BufferDesc (", BuffDesc.uiSizeInBytes, ") does not match the size recovered from gl buffer object (", BufferSize, ")")
+ VERIFY(BuffDesc.uiSizeInBytes == 0 || BuffDesc.uiSizeInBytes == static_cast<Uint32>(BufferSize), "Buffer size specified by the BufferDesc (", BuffDesc.uiSizeInBytes, ") does not match the size recovered from gl buffer object (", BufferSize, ")");
if(BufferSize > 0)
BuffDesc.uiSizeInBytes = static_cast<Uint32>( BufferSize );
@@ -375,7 +375,7 @@ void BufferGLImpl::CreateViewInternal( const BufferViewDesc &OrigViewDesc, class
catch( const std::runtime_error & )
{
const auto *ViewTypeName = GetBufferViewTypeLiteralName(OrigViewDesc.ViewType);
- LOG_ERROR("Failed to create view \"", OrigViewDesc.Name ? OrigViewDesc.Name : "", "\" (", ViewTypeName, ") for buffer \"", m_Desc.Name ? m_Desc.Name : "", "\"" )
+ LOG_ERROR("Failed to create view \"", OrigViewDesc.Name ? OrigViewDesc.Name : "", "\" (", ViewTypeName, ") for buffer \"", m_Desc.Name ? m_Desc.Name : "", "\"");
}
}
diff --git a/Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp
index f0c5a727..9b7b2a74 100644
--- a/Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp
@@ -49,7 +49,7 @@ namespace Diligent
ContextState.BindTexture(-1, GL_TEXTURE_BUFFER, m_GLTexBuffer );
const auto &BuffFmt = pBuffer->GetDesc().Format;
- VERIFY_EXPR(BuffFmt.ValueType != VT_UNDEFINED)
+ VERIFY_EXPR(BuffFmt.ValueType != VT_UNDEFINED);
auto GLFormat = TypeToGLTexFormat( BuffFmt.ValueType, BuffFmt.NumComponents, BuffFmt.IsNormalized );
glTexBuffer( GL_TEXTURE_BUFFER, GLFormat, pBuffer->GetGLHandle() );
CHECK_GL_ERROR_AND_THROW( "Failed to create texture buffer" );
diff --git a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp
index 21953d10..d9f3a08d 100644
--- a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp
@@ -289,7 +289,7 @@ namespace Diligent
}
else
{
- VERIFY(m_NumBoundRenderTargets != 0 || m_pBoundDepthStencil, "At least one render target or a depth stencil is expected" )
+ VERIFY(m_NumBoundRenderTargets != 0 || m_pBoundDepthStencil, "At least one render target or a depth stencil is expected");
Uint32 NumRenderTargets = m_NumBoundRenderTargets;
VERIFY(NumRenderTargets < MaxRenderTargets, "Too many render targets (", NumRenderTargets, ") are being set");
@@ -323,7 +323,7 @@ namespace Diligent
auto *pRenderDeviceGL = ValidatedCast<RenderDeviceGLImpl>(m_pDevice.RawPtr());
if (!m_pPipelineState)
{
- LOG_ERROR("No pipeline state is bound")
+ LOG_ERROR("No pipeline state is bound");
return;
}
auto *pPipelineStateGL = ValidatedCast<PipelineStateGLImpl>(m_pPipelineState.RawPtr());
@@ -335,7 +335,7 @@ namespace Diligent
VERIFY( Prog ^ Pipeline, "Only one of program or pipeline can be specified" );
if( !(Prog || Pipeline) )
{
- LOG_ERROR_MESSAGE( "No program/program pipeline is set for the draw call" )
+ LOG_ERROR_MESSAGE("No program/program pipeline is set for the draw call");
return;
}
auto ProgramPipelineSupported = DeviceCaps.bSeparableProgramSupported;
@@ -377,7 +377,7 @@ namespace Diligent
for(Uint32 ArrInd = 0; ArrInd < it->pResources.size(); ++ArrInd)
{
auto& Resource = it->pResources[ArrInd];
- if( Resource )
+ if (Resource)
{
auto *pBufferOGL = ValidatedCast<BufferGLImpl>(Resource.RawPtr());
pBufferOGL->BufferMemoryBarrier(
@@ -385,26 +385,26 @@ namespace Diligent
// will reflect data written by shaders prior to the barrier
m_ContextState);
- glBindBufferBase( GL_UNIFORM_BUFFER, UniformBuffBindPoint, pBufferOGL->m_GlBuffer );
- CHECK_GL_ERROR( "Failed to bind uniform buffer" );
+ glBindBufferBase(GL_UNIFORM_BUFFER, UniformBuffBindPoint, pBufferOGL->m_GlBuffer);
+ CHECK_GL_ERROR("Failed to bind uniform buffer");
//glBindBufferRange(GL_UNIFORM_BUFFER, it->Index, pBufferOGL->m_GlBuffer, 0, pBufferOGL->GetDesc().uiSizeInBytes);
- glUniformBlockBinding( GLProgID, it->Index + ArrInd, UniformBuffBindPoint );
- CHECK_GL_ERROR( "glUniformBlockBinding() failed" );
+ glUniformBlockBinding(GLProgID, it->Index + ArrInd, UniformBuffBindPoint);
+ CHECK_GL_ERROR("glUniformBlockBinding() failed");
++UniformBuffBindPoint;
}
else
{
- #define LOG_MISSING_BINDING(VarType, Res, ArrInd)\
- { \
+#define LOG_MISSING_BINDING(VarType, Res, ArrInd)\
+ do{ \
if(Res->pResources.size()>1) \
- LOG_ERROR_MESSAGE( "No ", VarType, " is bound to \"", Res->Name, '[', ArrInd, "]\" variable in shader \"", pShaderGL->GetDesc().Name, "\"" )\
+ LOG_ERROR_MESSAGE( "No ", VarType, " is bound to \"", Res->Name, '[', ArrInd, "]\" variable in shader \"", pShaderGL->GetDesc().Name, "\"" );\
else \
- LOG_ERROR_MESSAGE( "No ", VarType, " is bound to \"", Res->Name, "\" variable in shader \"", pShaderGL->GetDesc().Name, "\"" )\
- }
+ LOG_ERROR_MESSAGE( "No ", VarType, " is bound to \"", Res->Name, "\" variable in shader \"", pShaderGL->GetDesc().Name, "\"" );\
+ }while(false)
- LOG_MISSING_BINDING("uniform buffer", it, ArrInd)
+ LOG_MISSING_BINDING("uniform buffer", it, ArrInd);
}
}
}
@@ -482,7 +482,7 @@ namespace Diligent
}
else
{
- LOG_MISSING_BINDING("texture sampler", it, ArrInd)
+ LOG_MISSING_BINDING("texture sampler", it, ArrInd);
}
}
}
@@ -547,7 +547,7 @@ namespace Diligent
}
else
{
- LOG_MISSING_BINDING("image", it, ArrInd)
+ LOG_MISSING_BINDING("image", it, ArrInd);
}
}
}
@@ -581,7 +581,7 @@ namespace Diligent
}
else
{
- LOG_MISSING_BINDING("shader storage block", it, ArrInd )
+ LOG_MISSING_BINDING("shader storage block", it, ArrInd);
}
}
}
@@ -646,7 +646,7 @@ namespace Diligent
if (!m_pPipelineState)
{
- LOG_ERROR("No pipeline state is bound.")
+ LOG_ERROR("No pipeline state is bound.");
return;
}
diff --git a/Graphics/GraphicsEngineOpenGL/src/GLContextState.cpp b/Graphics/GraphicsEngineOpenGL/src/GLContextState.cpp
index 6fab02ba..650a3f1a 100644
--- a/Graphics/GraphicsEngineOpenGL/src/GLContextState.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/GLContextState.cpp
@@ -516,7 +516,7 @@ namespace Diligent
}
else
{
- LOG_WARNING_MESSAGE( "Disabling depth clamp is not supported" )
+ LOG_WARNING_MESSAGE("Disabling depth clamp is not supported");
}
#pragma warning(pop)
}
diff --git a/Graphics/GraphicsEngineOpenGL/src/GLContextWindows.cpp b/Graphics/GraphicsEngineOpenGL/src/GLContextWindows.cpp
index c7f9434f..65fcb26c 100644
--- a/Graphics/GraphicsEngineOpenGL/src/GLContextWindows.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/GLContextWindows.cpp
@@ -186,7 +186,7 @@ namespace Diligent
auto CurrentCtx = wglGetCurrentContext();
if (CurrentCtx == 0)
{
- LOG_ERROR_AND_THROW("No current GL context found! Provide non-null handle to a native Window to create a GL context")
+ LOG_ERROR_AND_THROW("No current GL context found! Provide non-null handle to a native Window to create a GL context");
}
// Initialize GLEW
@@ -201,7 +201,7 @@ namespace Diligent
//Or better yet, use the GL3 way to get the version number
glGetIntegerv( GL_MAJOR_VERSION, &MajorVersion );
glGetIntegerv( GL_MINOR_VERSION, &MinorVersion );
- LOG_INFO_MESSAGE(Info.pNativeWndHandle != nullptr ? "Initialized OpenGL " : "Attached to OpenGL ", MajorVersion, '.', MinorVersion, " context (", GLVersionString, ')')
+ LOG_INFO_MESSAGE(Info.pNativeWndHandle != nullptr ? "Initialized OpenGL " : "Attached to OpenGL ", MajorVersion, '.', MinorVersion, " context (", GLVersionString, ')');
// Under the standard filtering rules for cubemaps, filtering does not work across faces of the cubemap.
// This results in a seam across the faces of a cubemap. This was a hardware limitation in the past, but
@@ -244,10 +244,10 @@ namespace Diligent
void GLContext::SwapBuffers()
{
- if(m_WindowHandleToDeviceContext)
- ::SwapBuffers( m_WindowHandleToDeviceContext );
+ if (m_WindowHandleToDeviceContext)
+ ::SwapBuffers(m_WindowHandleToDeviceContext);
else
- LOG_ERROR("Swap buffer failed because window handle to device context is not initialized")
+ LOG_ERROR("Swap buffer failed because window handle to device context is not initialized");
}
GLContext::NativeGLContextType GLContext::GetCurrentNativeGLContext()
diff --git a/Graphics/GraphicsEngineOpenGL/src/GLProgramResources.cpp b/Graphics/GraphicsEngineOpenGL/src/GLProgramResources.cpp
index 71168b66..81350228 100644
--- a/Graphics/GraphicsEngineOpenGL/src/GLProgramResources.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/GLProgramResources.cpp
@@ -55,7 +55,7 @@ namespace Diligent
const StaticSamplerDesc *StaticSamplers,
Uint32 NumStaticSamplers)
{
- VERIFY(GLProgram != 0, "Null GL program")
+ VERIFY(GLProgram != 0, "Null GL program");
GLint numActiveUniforms = 0;
glGetProgramiv( GLProgram, GL_ACTIVE_UNIFORMS, &numActiveUniforms );
@@ -284,7 +284,7 @@ namespace Diligent
{
#ifdef _DEBUG
for(const auto &ub : m_UniformBlocks)
- VERIFY(ub.Name.compare(Name.data()) != 0, "Uniform block with the name \"", ub.Name, "\" has already been enumerated")
+ VERIFY(ub.Name.compare(Name.data()) != 0, "Uniform block with the name \"", ub.Name, "\" has already been enumerated");
#endif
}
}
@@ -332,7 +332,7 @@ namespace Diligent
{
#ifdef _DEBUG
for(const auto &sb : m_StorageBlocks)
- VERIFY(sb.Name.compare(Name.data()) != 0, "Storage block with the name \"", sb.Name, "\" has already been enumerated")
+ VERIFY(sb.Name.compare(Name.data()) != 0, "Storage block with the name \"", sb.Name, "\" has already been enumerated");
#endif
}
}
@@ -469,9 +469,9 @@ namespace Diligent
if( !res->pResources[ArrInd] )
{
if( res->pResources.size() > 1)
- LOG_ERROR_MESSAGE( "No resource is bound to ", VarType, " variable \"", res->Name, "[", ArrInd, "]\"" )
+ LOG_ERROR_MESSAGE( "No resource is bound to ", VarType, " variable \"", res->Name, "[", ArrInd, "]\"" );
else
- LOG_ERROR_MESSAGE( "No resource is bound to ", VarType, " variable \"", res->Name, "\"" )
+ LOG_ERROR_MESSAGE( "No resource is bound to ", VarType, " variable \"", res->Name, "\"" );
}
}
}
diff --git a/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp
index ea26a880..261b9161 100644
--- a/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp
@@ -172,7 +172,7 @@ ShaderGLImpl::ShaderGLImpl(IReferenceCounters *pRefCounters, RenderDeviceGLImpl
RefCntAutoPtr<IFileStream> pSourceStream;
ShaderCreationAttribs.pShaderSourceStreamFactory->CreateInputStream( ShaderCreationAttribs.FilePath, &pSourceStream );
if (pSourceStream == nullptr)
- LOG_ERROR_AND_THROW("Failed to open shader source file")
+ LOG_ERROR_AND_THROW("Failed to open shader source file");
pSourceStream->Read( pFileData );
ShaderSource = reinterpret_cast<char*>(pFileData->GetDataPtr());
diff --git a/Graphics/GraphicsEngineOpenGL/src/TexRegionRender.cpp b/Graphics/GraphicsEngineOpenGL/src/TexRegionRender.cpp
index a790c978..7b434c18 100644
--- a/Graphics/GraphicsEngineOpenGL/src/TexRegionRender.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/TexRegionRender.cpp
@@ -207,7 +207,7 @@ namespace Diligent
if( TexFmtAttribs.ComponentType == COMPONENT_TYPE_SNORM )
{
LOG_WARNING_MESSAGE("CopyData() is performed by rendering to texture.\n"
- "There might be an issue in OpenGL driver on NVidia hardware: when rendering to SNORM textures, all negative values are clamped to zero.")
+ "There might be an issue in OpenGL driver on NVidia hardware: when rendering to SNORM textures, all negative values are clamped to zero.");
}
pCtxGL->SetPipelineState(m_pPSO[FSInd]);
diff --git a/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp b/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp
index 92f1ebdd..2ce06837 100644
--- a/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp
@@ -64,7 +64,7 @@ static GLenum GetTextureInternalFormat(DeviceContextGLImpl *pDeviceContextGL, GL
GLint GlFormat = 0;
glGetTexLevelParameteriv(QueryBindTarget, 0, GL_TEXTURE_INTERNAL_FORMAT, &GlFormat);
CHECK_GL_ERROR( "Failed to get texture format through glGetTexLevelParameteriv()" );
- VERIFY(GlFormat != 0, "Unable to get texture format")
+ VERIFY(GlFormat != 0, "Unable to get texture format");
ContextState.BindTexture(-1, BindTarget, GLObjectWrappers::GLTextureObj(false) );
@@ -75,7 +75,7 @@ static TextureDesc GetTextureDescFromGLHandle(DeviceContextGLImpl *pDeviceContex
{
auto &ContextState = pDeviceContextGL->GetContextState();
- VERIFY(BindTarget != GL_TEXTURE_CUBE_MAP_ARRAY, "Cubemap arrays are not currently supported")
+ VERIFY(BindTarget != GL_TEXTURE_CUBE_MAP_ARRAY, "Cubemap arrays are not currently supported");
GLObjectWrappers::GLTextureObj TmpGLTexWrapper(true, GLObjectWrappers::GLTextureCreateReleaseHelper(GLHandle));
ContextState.BindTexture(-1, BindTarget, TmpGLTexWrapper);
@@ -100,9 +100,9 @@ static TextureDesc GetTextureDescFromGLHandle(DeviceContextGLImpl *pDeviceContex
glGetTexLevelParameteriv(QueryBindTarget, 0, GL_TEXTURE_INTERNAL_FORMAT, &GlFormat);
CHECK_GL_ERROR( "Failed to get texture level 0 parameters through glGetTexLevelParameteriv()" );
- VERIFY(GlFormat != 0, "Unable to get texture format")
+ VERIFY(GlFormat != 0, "Unable to get texture format");
if (TexDesc.Format != TEX_FORMAT_UNKNOWN)
- VERIFY(static_cast<GLenum>(GlFormat) == TexFormatToGLInternalTexFormat(TexDesc.Format), "Specified texture format (", GetTextureFormatAttribs(TexDesc.Format).Name,") does not match GL texture internal format (", GlFormat, ")")
+ VERIFY(static_cast<GLenum>(GlFormat) == TexFormatToGLInternalTexFormat(TexDesc.Format), "Specified texture format (", GetTextureFormatAttribs(TexDesc.Format).Name,") does not match GL texture internal format (", GlFormat, ")");
else
TexDesc.Format = GLInternalTexFormatToTexFormat(GlFormat);
@@ -281,7 +281,7 @@ void TextureBaseGL::CreateViewInternal( const struct TextureViewDesc &OrigViewDe
catch( const std::runtime_error& )
{
const auto *ViewTypeName = GetTexViewTypeLiteralName(OrigViewDesc.ViewType);
- LOG_ERROR("Failed to create view \"", OrigViewDesc.Name ? OrigViewDesc.Name : "", "\" (", ViewTypeName, ") for texture \"", m_Desc.Name ? m_Desc.Name : "", "\"" )
+ LOG_ERROR("Failed to create view \"", OrigViewDesc.Name ? OrigViewDesc.Name : "", "\" (", ViewTypeName, ") for texture \"", m_Desc.Name ? m_Desc.Name : "", "\"" );
}
}
@@ -440,13 +440,13 @@ void TextureBaseGL :: CopyData(IDeviceContext *pContext,
void TextureBaseGL :: Map(IDeviceContext *pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags, MappedTextureSubresource &MappedData)
{
TTextureBase::Map( pContext, Subresource, MapType, MapFlags, MappedData );
- LOG_ERROR_MESSAGE("Texture mapping is not supported in OpenGL")
+ LOG_ERROR_MESSAGE("Texture mapping is not supported in OpenGL");
}
void TextureBaseGL::Unmap( IDeviceContext *pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags )
{
TTextureBase::Unmap(pContext, Subresource, MapType, MapFlags);
- LOG_ERROR_MESSAGE("Texture mapping is not supported in OpenGL")
+ LOG_ERROR_MESSAGE("Texture mapping is not supported in OpenGL");
}
void TextureBaseGL::TextureMemoryBarrier( Uint32 RequiredBarriers, GLContextState &GLContextState )
diff --git a/Graphics/GraphicsEngineOpenGL/src/TextureCubeArray_OGL.cpp b/Graphics/GraphicsEngineOpenGL/src/TextureCubeArray_OGL.cpp
index e49b1a8c..43e8f6e9 100644
--- a/Graphics/GraphicsEngineOpenGL/src/TextureCubeArray_OGL.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/TextureCubeArray_OGL.cpp
@@ -42,7 +42,7 @@ TextureCubeArray_OGL::TextureCubeArray_OGL( IReferenceCounters *pRefCounters,
bool bIsDeviceInternal /*= false*/) :
TextureBaseGL(pRefCounters, TexViewObjAllocator, pDeviceGL, TexDesc, GL_TEXTURE_CUBE_MAP_ARRAY, InitData, bIsDeviceInternal)
{
- VERIFY(m_Desc.SampleCount == 1, "Multisampled texture cube arrays are not supported")
+ VERIFY(m_Desc.SampleCount == 1, "Multisampled texture cube arrays are not supported");
auto &ContextState = pDeviceContext->GetContextState();
ContextState.BindTexture(-1, m_BindTarget, m_GlTexture);