Skip to content

Commit

Permalink
style: follow clang-tidy suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
RiscadoA and github-actions[bot] authored Oct 1, 2023
1 parent 8a5f7a4 commit 9d3ef8a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions core/src/cubos/core/gl/ogl_render_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@ Sampler OGLRenderDevice::createSampler(const SamplerDesc& desc)
glGenSamplers(1, &id);
glSamplerParameteri(id, GL_TEXTURE_MIN_FILTER, static_cast<GLint>(minFilter));
glSamplerParameteri(id, GL_TEXTURE_MAG_FILTER, static_cast<GLint>(magFilter));
if (GLAD_GL_ARB_texture_filter_anisotropic)
if (GLAD_GL_ARB_texture_filter_anisotropic != 0)
{
glSamplerParameteri(id, GL_TEXTURE_MAX_ANISOTROPY_EXT, static_cast<GLint>(desc.maxAnisotropy));
}
Expand Down Expand Up @@ -1707,7 +1707,7 @@ Texture1D OGLRenderDevice::createTexture1D(const Texture1DDesc& desc)
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
if (GLAD_GL_ARB_texture_filter_anisotropic)
if (GLAD_GL_ARB_texture_filter_anisotropic != 0)
{
glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0F);
}
Expand Down Expand Up @@ -1751,7 +1751,7 @@ Texture2D OGLRenderDevice::createTexture2D(const Texture2DDesc& desc)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
if (GLAD_GL_ARB_texture_filter_anisotropic)
if (GLAD_GL_ARB_texture_filter_anisotropic != 0)
{
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0F);
}
Expand Down Expand Up @@ -1803,7 +1803,7 @@ Texture2DArray OGLRenderDevice::createTexture2DArray(const Texture2DArrayDesc& d
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
if (GLAD_GL_ARB_texture_filter_anisotropic)
if (GLAD_GL_ARB_texture_filter_anisotropic != 0)
{
glTexParameterf(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0F);
}
Expand Down Expand Up @@ -1854,7 +1854,7 @@ Texture3D OGLRenderDevice::createTexture3D(const Texture3DDesc& desc)
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
if (GLAD_GL_ARB_texture_filter_anisotropic)
if (GLAD_GL_ARB_texture_filter_anisotropic != 0)
{
glTexParameterf(GL_TEXTURE_3D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0F);
}
Expand Down Expand Up @@ -1912,7 +1912,7 @@ CubeMap OGLRenderDevice::createCubeMap(const CubeMapDesc& desc)
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
if (GLAD_GL_ARB_texture_filter_anisotropic)
if (GLAD_GL_ARB_texture_filter_anisotropic != 0)
{
glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0F);
}
Expand Down Expand Up @@ -1967,7 +1967,7 @@ CubeMapArray OGLRenderDevice::createCubeMapArray(const CubeMapArrayDesc& desc)
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
if (GLAD_GL_ARB_texture_filter_anisotropic)
if (GLAD_GL_ARB_texture_filter_anisotropic != 0)
{
glTexParameterf(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0F);
}
Expand Down Expand Up @@ -2519,7 +2519,7 @@ int OGLRenderDevice::getProperty(Property prop)
switch (prop)
{
case Property::MaxAnisotropy:
if (!GLAD_GL_ARB_texture_filter_anisotropic)
if (GLAD_GL_ARB_texture_filter_anisotropic == 0)
{
return 1;
}
Expand Down

0 comments on commit 9d3ef8a

Please sign in to comment.