From ad4bded2ac01e1bdbf146403a85163d10bf16014 Mon Sep 17 00:00:00 2001 From: assiduous Date: Tue, 7 Jan 2020 21:16:37 -0800 Subject: Fixed some clang warnings --- Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') 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"); -- cgit v1.2.3