From 2a529ae07f1e1f60dc0b01add171244026e10756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kapu=C5=9Bci=C5=84ski?= Date: Mon, 2 May 2022 19:22:50 +0200 Subject: [PATCH] More cleanup --- src/graphics/core/device.h | 16 --------------- src/graphics/opengl33/glutil.cpp | 34 -------------------------------- src/graphics/opengl33/glutil.h | 4 ---- 3 files changed, 54 deletions(-) diff --git a/src/graphics/core/device.h b/src/graphics/core/device.h index b10df506..c547d249 100644 --- a/src/graphics/core/device.h +++ b/src/graphics/core/device.h @@ -128,22 +128,6 @@ struct DeviceCapabilities int maxSamples = 1; }; -/** - * \enum CompFunc - * \brief Type of function used to compare values - */ -enum CompFunc -{ - COMP_FUNC_NEVER, - COMP_FUNC_LESS, - COMP_FUNC_EQUAL, - COMP_FUNC_NOTEQUAL, - COMP_FUNC_LEQUAL, - COMP_FUNC_GREATER, - COMP_FUNC_GEQUAL, - COMP_FUNC_ALWAYS -}; - /** * \enum FillMode * \brief Polygon fill mode diff --git a/src/graphics/opengl33/glutil.cpp b/src/graphics/opengl33/glutil.cpp index 420ae236..5bca1541 100644 --- a/src/graphics/opengl33/glutil.cpp +++ b/src/graphics/opengl33/glutil.cpp @@ -287,40 +287,6 @@ GLenum TranslateGfxPrimitive(PrimitiveType type) return flag; } -CompFunc TranslateGLCompFunc(GLenum flag) -{ - switch (flag) - { - case GL_NEVER: return COMP_FUNC_NEVER; - case GL_LESS: return COMP_FUNC_LESS; - case GL_EQUAL: return COMP_FUNC_EQUAL; - case GL_NOTEQUAL: return COMP_FUNC_NOTEQUAL; - case GL_LEQUAL: return COMP_FUNC_LEQUAL; - case GL_GREATER: return COMP_FUNC_GREATER; - case GL_GEQUAL: return COMP_FUNC_GEQUAL; - case GL_ALWAYS: return COMP_FUNC_ALWAYS; - default: assert(false); break; - } - return COMP_FUNC_NEVER; -} - -GLenum TranslateGfxCompFunc(CompFunc func) -{ - switch (func) - { - case COMP_FUNC_NEVER: return GL_NEVER; - case COMP_FUNC_LESS: return GL_LESS; - case COMP_FUNC_EQUAL: return GL_EQUAL; - case COMP_FUNC_NOTEQUAL: return GL_NOTEQUAL; - case COMP_FUNC_LEQUAL: return GL_LEQUAL; - case COMP_FUNC_GREATER: return GL_GREATER; - case COMP_FUNC_GEQUAL: return GL_GEQUAL; - case COMP_FUNC_ALWAYS: return GL_ALWAYS; - default: assert(false); break; - } - return 0; -} - bool InPlane(glm::vec3 normal, float originPlane, glm::vec3 center, float radius) { float distance = originPlane + glm::dot(normal, center); diff --git a/src/graphics/opengl33/glutil.h b/src/graphics/opengl33/glutil.h index 601a626d..920f355f 100644 --- a/src/graphics/opengl33/glutil.h +++ b/src/graphics/opengl33/glutil.h @@ -67,10 +67,6 @@ bool CheckGLErrors(); //! Translate Gfx primitive type to OpenGL primitive type GLenum TranslateGfxPrimitive(PrimitiveType type); -CompFunc TranslateGLCompFunc(GLenum flag); - -GLenum TranslateGfxCompFunc(CompFunc func); - bool InPlane(glm::vec3 normal, float originPlane, glm::vec3 center, float radius); GLenum TranslateType(Type type);