diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-01-08 05:16:37 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-01-08 05:16:37 +0000 |
| commit | ad4bded2ac01e1bdbf146403a85163d10bf16014 (patch) | |
| tree | 83249d0449b334999ac7ef6614a2aa3687876b39 /Graphics/GraphicsEngineOpenGL | |
| parent | Finished reworking device feature reporting; removed EngineVkCreateInfo::Devi... (diff) | |
| download | DiligentCore-ad4bded2ac01e1bdbf146403a85163d10bf16014.tar.gz DiligentCore-ad4bded2ac01e1bdbf146403a85163d10bf16014.zip | |
Fixed some clang warnings
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp index ba65eb76..fc50c709 100644 --- a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp @@ -139,9 +139,10 @@ RenderDeviceGLImpl::RenderDeviceGLImpl(IReferenceCounters* pRefCounters, if (m_DeviceCaps.DevType == DeviceType::OpenGL) { - const bool IsGL43OrAbove = MajorVersion >= 5 || MajorVersion == 4 && MinorVersion >= 3; - const bool IsGL42OrAbove = MajorVersion >= 5 || MajorVersion == 4 && MinorVersion >= 2; - const bool IsGL41OrAbove = MajorVersion >= 5 || MajorVersion == 4 && MinorVersion >= 1; + const bool IsGL46OrAbove = (MajorVersion >= 5) || (MajorVersion == 4 && MinorVersion >= 6); + const bool IsGL43OrAbove = (MajorVersion >= 5) || (MajorVersion == 4 && MinorVersion >= 3); + const bool IsGL42OrAbove = (MajorVersion >= 5) || (MajorVersion == 4 && MinorVersion >= 2); + const bool IsGL41OrAbove = (MajorVersion >= 5) || (MajorVersion == 4 && MinorVersion >= 1); Features.SeparablePrograms = True; Features.IndirectRendering = True; @@ -176,7 +177,7 @@ RenderDeviceGLImpl::RenderDeviceGLImpl(IReferenceCounters* pRefCounters, TexCaps.CubemapArraysSupported = IsGL43OrAbove || CheckExtension("GL_ARB_texture_cube_map_array"); SamCaps.BorderSamplingModeSupported = True; - SamCaps.AnisotropicFilteringSupported = (MajorVersion >= 5 || MajorVersion == 4 && MinorVersion >= 6) || CheckExtension("GL_ARB_texture_filter_anisotropic"); + SamCaps.AnisotropicFilteringSupported = IsGL46OrAbove || CheckExtension("GL_ARB_texture_filter_anisotropic"); SamCaps.LODBiasSupported = True; } else @@ -186,8 +187,8 @@ RenderDeviceGLImpl::RenderDeviceGLImpl(IReferenceCounters* pRefCounters, VERIFY(m_DeviceCaps.DevType == DeviceType::OpenGLES, "Unexpected device type: OpenGLES expected"); - bool IsGLES31OrAbove = (MajorVersion >= 4 || (MajorVersion == 3 && MinorVersion >= 1)); - bool IsGLES32OrAbove = (MajorVersion >= 4 || (MajorVersion == 3 && MinorVersion >= 2)); + bool IsGLES31OrAbove = (MajorVersion >= 4) || (MajorVersion == 3 && MinorVersion >= 1); + bool IsGLES32OrAbove = (MajorVersion >= 4) || (MajorVersion == 3 && MinorVersion >= 2); Features.SeparablePrograms = IsGLES31OrAbove || strstr(Extensions, "separate_shader_objects"); Features.IndirectRendering = IsGLES31OrAbove || strstr(Extensions, "draw_indirect"); |
