diff --git a/sources/Renderer/OpenGL/Command/GLCommandAssembler.cpp b/sources/Renderer/OpenGL/Command/GLCommandAssembler.cpp index 51014a069a..01b2a24ac6 100644 --- a/sources/Renderer/OpenGL/Command/GLCommandAssembler.cpp +++ b/sources/Renderer/OpenGL/Command/GLCommandAssembler.cpp @@ -459,7 +459,7 @@ static std::size_t AssembleGLCommand(const GLOpcode opcode, const void* pc, JITC return sizeof(*cmd); } #endif - #if GL_KHR_debug + #if LLGL_GLEXT_DEBUG case GLOpcodePushDebugGroup: { auto cmd = reinterpret_cast(pc); @@ -471,7 +471,7 @@ static std::size_t AssembleGLCommand(const GLOpcode opcode, const void* pc, JITC compiler.Call(glPopDebugGroup); return 0; } - #endif // /GL_KHR_debug + #endif // /LLGL_GLEXT_DEBUG default: return 0; } diff --git a/sources/Renderer/OpenGL/Command/GLDeferredCommandBuffer.cpp b/sources/Renderer/OpenGL/Command/GLDeferredCommandBuffer.cpp index 2ef1552f27..33c99b2742 100644 --- a/sources/Renderer/OpenGL/Command/GLDeferredCommandBuffer.cpp +++ b/sources/Renderer/OpenGL/Command/GLDeferredCommandBuffer.cpp @@ -967,7 +967,7 @@ void GLDeferredCommandBuffer::DispatchIndirect(Buffer& buffer, std::uint64_t off void GLDeferredCommandBuffer::PushDebugGroup(const char* name) { - #if GL_KHR_debug + #if LLGL_GLEXT_DEBUG if (HasExtension(GLExt::KHR_debug)) { /* Push debug group name into command stream with default ID no. */ @@ -984,15 +984,15 @@ void GLDeferredCommandBuffer::PushDebugGroup(const char* name) ::memcpy(cmd + 1, name, croppedLength + 1); } } - #endif // /GL_KHR_debug + #endif // /LLGL_GLEXT_DEBUG } void GLDeferredCommandBuffer::PopDebugGroup() { - #if GL_KHR_debug + #if LLGL_GLEXT_DEBUG if (HasExtension(GLExt::KHR_debug)) AllocOpcode(GLOpcodePopDebugGroup); - #endif // /GL_KHR_debug + #endif // /LLGL_GLEXT_DEBUG } /* ----- Extensions ----- */ diff --git a/sources/Renderer/OpenGL/Command/GLImmediateCommandBuffer.cpp b/sources/Renderer/OpenGL/Command/GLImmediateCommandBuffer.cpp index d4c2e76662..7fe8745e88 100644 --- a/sources/Renderer/OpenGL/Command/GLImmediateCommandBuffer.cpp +++ b/sources/Renderer/OpenGL/Command/GLImmediateCommandBuffer.cpp @@ -829,7 +829,7 @@ void GLImmediateCommandBuffer::DispatchIndirect(Buffer& buffer, std::uint64_t of void GLImmediateCommandBuffer::PushDebugGroup(const char* name) { - #if GL_KHR_debug + #if LLGL_GLEXT_DEBUG if (HasExtension(GLExt::KHR_debug)) { /* Push debug group name into command stream with default ID no. */ @@ -840,15 +840,15 @@ void GLImmediateCommandBuffer::PushDebugGroup(const char* name) glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, id, static_cast(croppedLength), name); } - #endif // /GL_KHR_debug + #endif // /LLGL_GLEXT_DEBUG } void GLImmediateCommandBuffer::PopDebugGroup() { - #if GL_KHR_debug + #if LLGL_GLEXT_DEBUG if (HasExtension(GLExt::KHR_debug)) glPopDebugGroup(); - #endif // /GL_KHR_debug + #endif // /LLGL_GLEXT_DEBUG } /* ----- Extensions ----- */ diff --git a/sources/Renderer/OpenGL/GLESProfile/OpenGLES.h b/sources/Renderer/OpenGL/GLESProfile/OpenGLES.h index d0326b9529..37bd788279 100644 --- a/sources/Renderer/OpenGL/GLESProfile/OpenGLES.h +++ b/sources/Renderer/OpenGL/GLESProfile/OpenGLES.h @@ -15,9 +15,8 @@ # include # include #elif defined(LLGL_OS_ANDROID) - // Include all GLES 3.0 functions with static linkage as well as GLES2 extensions + // Include all GLES 3.0 functions with static linkage # include -# include // Include all GLES 3.1+ functions as extensions with dynamic linkage # ifdef GL_GLES_PROTOTYPES diff --git a/sources/Renderer/OpenGL/GLObjectUtils.cpp b/sources/Renderer/OpenGL/GLObjectUtils.cpp index 0077953ab8..5334732772 100644 --- a/sources/Renderer/OpenGL/GLObjectUtils.cpp +++ b/sources/Renderer/OpenGL/GLObjectUtils.cpp @@ -17,7 +17,7 @@ namespace LLGL { -#if GL_KHR_debug +#if LLGL_GLEXT_DEBUG // Returns the length of the specified label with a maximum length determined by GL_MAX_LABEL_LENGTH static GLsizei GetCroppedLength(const char* label) @@ -28,11 +28,11 @@ static GLsizei GetCroppedLength(const char* label) return static_cast(croppedLength); } -#endif // /GL_KHR_debug +#endif // /LLGL_GLEXT_DEBUG void GLSetObjectLabel(GLenum identifier, GLuint name, const char* label) { - #if GL_KHR_debug + #if LLGL_GLEXT_DEBUG if (HasExtension(GLExt::KHR_debug)) { if (label != nullptr) @@ -40,7 +40,7 @@ void GLSetObjectLabel(GLenum identifier, GLuint name, const char* label) else glObjectLabel(identifier, name, 0, nullptr); } - #endif // /GL_KHR_debug + #endif // /LLGL_GLEXT_DEBUG } void GLSetObjectLabelSubscript(GLenum identifier, GLuint name, const char* label, const char* subscript) @@ -74,7 +74,7 @@ void GLSetObjectLabelIndexed(GLenum identifier, GLuint name, const char* label, void GLSetObjectPtrLabel(void* ptr, const char* label) { - #if GL_KHR_debug + #if LLGL_GLEXT_DEBUG if (HasExtension(GLExt::KHR_debug)) { if (label != nullptr) @@ -82,7 +82,7 @@ void GLSetObjectPtrLabel(void* ptr, const char* label) else glObjectPtrLabel(ptr, 0, nullptr); } - #endif // /GL_KHR_debug + #endif // /LLGL_GLEXT_DEBUG } diff --git a/sources/Renderer/OpenGL/GLRenderSystem.cpp b/sources/Renderer/OpenGL/GLRenderSystem.cpp index 30f1bfdc32..532b680ffb 100644 --- a/sources/Renderer/OpenGL/GLRenderSystem.cpp +++ b/sources/Renderer/OpenGL/GLRenderSystem.cpp @@ -592,7 +592,7 @@ void GLRenderSystem::RegisterNewGLContext(GLContext& /*context*/, const GLPixelF EnableDebugCallback(); } -#if GL_KHR_debug +#if LLGL_GLEXT_DEBUG #ifdef LLGL_OPENGL void APIENTRY GLDebugCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* /*userParam*/) @@ -607,7 +607,7 @@ void GL_APIENTRY GLDebugCallback(GLenum source, GLenum type, GLuint id, GLenum s ); } -#endif // /GL_KHR_debug +#endif // /LLGL_GLEXT_DEBUG struct GLDebugMessageMetaData { @@ -616,7 +616,7 @@ struct GLDebugMessageMetaData void GLRenderSystem::EnableDebugCallback(bool enable) { - #if GL_KHR_debug + #if LLGL_GLEXT_DEBUG if (HasExtension(GLExt::KHR_debug)) { @@ -645,7 +645,7 @@ void GLRenderSystem::EnableDebugCallback(bool enable) } } - #endif // /GL_KHR_debug + #endif // /LLGL_GLEXT_DEBUG } static std::string GLGetString(GLenum name) diff --git a/sources/Renderer/OpenGL/OpenGL.h b/sources/Renderer/OpenGL/OpenGL.h index 63877672df..0d0fd4f178 100644 --- a/sources/Renderer/OpenGL/OpenGL.h +++ b/sources/Renderer/OpenGL/OpenGL.h @@ -37,7 +37,7 @@ #endif #if GL_KHR_debug || GL_ES_VERSION_3_2 -# define LLGL_GLEXT_DEBUG +# define LLGL_GLEXT_DEBUG 1 #endif //TODO: which extension? diff --git a/sources/Renderer/OpenGL/RenderState/GLStateManager.cpp b/sources/Renderer/OpenGL/RenderState/GLStateManager.cpp index 48c4df0109..9ee58e66ff 100644 --- a/sources/Renderer/OpenGL/RenderState/GLStateManager.cpp +++ b/sources/Renderer/OpenGL/RenderState/GLStateManager.cpp @@ -45,13 +45,13 @@ static const GLenum g_stateCapsEnum[] = { GL_BLEND, GL_CULL_FACE, - #if GL_KHR_debug + #if LLGL_GLEXT_DEBUG GL_DEBUG_OUTPUT, GL_DEBUG_OUTPUT_SYNCHRONOUS, - #else + #else // LLGL_GLEXT_DEBUG 0, 0, - #endif + #endif // /LLGL_GLEXT_DEBUG GL_DEPTH_TEST, GL_DITHER, GL_POLYGON_OFFSET_FILL, @@ -1718,7 +1718,7 @@ void GLStateManager::DetermineLimits() #endif /* Get extension specific limits */ - #if GL_KHR_debug + #if LLGL_GLEXT_DEBUG if (HasExtension(GLExt::KHR_debug)) { glGetIntegerv(GL_MAX_DEBUG_MESSAGE_LENGTH, &limits_.maxDebugNameLength);