summaryrefslogtreecommitdiff
path: root/src/render/opengl
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
commit3c404128c4669a1f4f190e20a89553677717fc50 (patch)
tree2db4e5031089c800c4e00fd6244e578f44a7c910 /src/render/opengl
parent89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff)
downloadmanaplus-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz
manaplus-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2
manaplus-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz
manaplus-3c404128c4669a1f4f190e20a89553677717fc50.zip
Add missing comments into defines.
Diffstat (limited to 'src/render/opengl')
-rw-r--r--src/render/opengl/mgl.cpp2
-rw-r--r--src/render/opengl/mgldefines.h34
-rw-r--r--src/render/opengl/mglemu.cpp2
-rw-r--r--src/render/opengl/mglfunctions.h4
-rw-r--r--src/render/opengl/mgltypes.h17
-rw-r--r--src/render/opengl/opengldebug.h4
6 files changed, 32 insertions, 31 deletions
diff --git a/src/render/opengl/mgl.cpp b/src/render/opengl/mgl.cpp
index cdcd5808b..11c4ca462 100644
--- a/src/render/opengl/mgl.cpp
+++ b/src/render/opengl/mgl.cpp
@@ -31,4 +31,4 @@
MGL_DEFINE
-#endif
+#endif // USE_OPENGL
diff --git a/src/render/opengl/mgldefines.h b/src/render/opengl/mgldefines.h
index 05d4bafcc..84b12da26 100644
--- a/src/render/opengl/mgldefines.h
+++ b/src/render/opengl/mgldefines.h
@@ -29,17 +29,17 @@
#define GL_COLOR_ATTACHMENT0 0x8CE0
#define GL_FRAMEBUFFER 0x8D40
#define GL_RENDERBUFFER 0x8D41
-#endif
+#endif // GL_NUM_EXTENSIONS
#ifndef GL_COMPRESSED_RGBA_ARB
#define GL_COMPRESSED_RGBA_ARB 0x84EE
#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
-#endif
+#endif // GL_COMPRESSED_RGBA_ARB
#ifndef GL_MAX_ELEMENTS_VERTICES
#define GL_MAX_ELEMENTS_VERTICES 0x80E8
#define GL_MAX_ELEMENTS_INDICES 0x80E9
-#endif
+#endif // GL_MAX_ELEMENTS_VERTICES
#ifndef GL_DEBUG_OUTPUT
#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
@@ -61,14 +61,14 @@
#define GL_DEBUG_SEVERITY_HIGH 0x9146
#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
#define GL_DEBUG_SEVERITY_LOW 0x9148
-#endif
+#endif // GL_DEBUG_OUTPUT
#ifndef GL_DEBUG_TYPE_PUSH_GROUP
#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
-#endif
+#endif // GL_DEBUG_TYPE_PUSH_GROUP
#ifndef GL_DEBUG_TYPE_POP_GROUP
#define GL_DEBUG_TYPE_POP_GROUP 0x826a
-#endif
+#endif // GL_DEBUG_TYPE_POP_GROUP
#ifndef GL_EXT_debug_label
#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
@@ -77,18 +77,18 @@
#define GL_BUFFER_OBJECT_EXT 0x9151
#define GL_QUERY_OBJECT_EXT 0x9153
#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
-#endif
+#endif // GL_EXT_debug_label
#ifndef GL_ARRAY_BUFFER
#define GL_ARRAY_BUFFER 0x8892
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-#endif
+#endif // GL_ARRAY_BUFFER
#ifndef GL_STREAM_DRAW
#define GL_STREAM_DRAW 0x88E0
#define GL_STATIC_DRAW 0x88E4
#define GL_DYNAMIC_DRAW 0x88E8
-#endif
+#endif // GL_STREAM_DRAW
#ifndef GL_COMPILE_STATUS
#define GL_FRAGMENT_SHADER 0x8B30
@@ -97,39 +97,39 @@
#define GL_LINK_STATUS 0x8B82
#define GL_VALIDATE_STATUS 0x8B83
#define GL_INFO_LOG_LENGTH 0x8B84
-#endif
+#endif // GL_COMPILE_STATUS
#ifndef GL_DEPTH_CLAMP
#define GL_DEPTH_CLAMP 0x864F
#define GL_RASTERIZER_DISCARD 0x8C89
#define GL_SAMPLE_MASK 0x8E51
-#endif
+#endif // GL_DEPTH_CLAMP
#ifndef GL_POLYGON_SMOOTH
#define GL_POLYGON_SMOOTH 0x0B41
-#endif
+#endif // GL_POLYGON_SMOOTH
#ifndef GL_DEPTH_BOUNDS_TEST_EXT
#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
-#endif
+#endif // GL_DEPTH_BOUNDS_TEST_EXT
#ifndef GL_TEXTURE_COMPRESSION_HINT_ARB
#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
-#endif
+#endif // GL_TEXTURE_COMPRESSION_HINT_ARB
#ifndef GLX_CONTEXT_PROFILE_MASK_ARB
#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
-#endif
+#endif // GLX_CONTEXT_PROFILE_MASK_ARB
#ifndef GLX_CONTEXT_MAJOR_VERSION_ARB
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
#define GLX_CONTEXT_FLAGS_ARB 0x2094
-#endif
+#endif // GLX_CONTEXT_MAJOR_VERSION_ARB
#ifndef GL_COMPRESSED_RGBA_BPTC_UNORM_ARB
#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C
-#endif
+#endif // GL_COMPRESSED_RGBA_BPTC_UNORM_ARB
#endif // USE_OPENGL
diff --git a/src/render/opengl/mglemu.cpp b/src/render/opengl/mglemu.cpp
index 297dae3e1..669f7952f 100644
--- a/src/render/opengl/mglemu.cpp
+++ b/src/render/opengl/mglemu.cpp
@@ -44,4 +44,4 @@ void APIENTRY emuglActiveTexture(GLenum texture A_UNUSED)
{
}
-#endif
+#endif // USE_OPENGL
diff --git a/src/render/opengl/mglfunctions.h b/src/render/opengl/mglfunctions.h
index de445c06b..a8009f899 100644
--- a/src/render/opengl/mglfunctions.h
+++ b/src/render/opengl/mglfunctions.h
@@ -35,10 +35,10 @@ LOGGER_H
#define getFunction(name) nullptr
#elif defined __native_client__
#define getFunction(name) glGetProcAddressREGAL(name)
-#else
+#else // WIN32
#define getFunction(name) glXGetProcAddress(\
reinterpret_cast<const GLubyte*>(name))
-#endif
+#endif // WIN32
#define assignFunction(func) \
{ \
diff --git a/src/render/opengl/mgltypes.h b/src/render/opengl/mgltypes.h
index dcd1290d1..828b862ce 100644
--- a/src/render/opengl/mgltypes.h
+++ b/src/render/opengl/mgltypes.h
@@ -27,14 +27,14 @@
#include <GLES/gl.h>
#include <GLES/glext.h>
#define APIENTRY GL_APIENTRY
-#else
+#else // ANDROID
#ifndef USE_SDL2
#define GL_GLEXT_PROTOTYPES 1
-#endif
+#endif // USE_SDL2
#include <SDL_opengl.h>
#ifdef __native_client__
#include <GL/Regal.h>
-#else
+#else // __native_client__
#if defined(__APPLE__)
#include <OpenGL/glext.h>
#else // defined(__APPLE__)
@@ -44,8 +44,8 @@
#error missing include <GL/glext.h>
#endif // __glext_h_
#endif // defined(__APPLE__)
-#endif
-#endif
+#endif // __native_client__
+#endif // ANDROID
#include "render/opengl/mgldefines.h"
RENDER_OPENGL_MGLDEFINES_H
@@ -142,7 +142,8 @@ typedef void (APIENTRY *glGetProgramInfoLog_t) (GLuint program,
typedef void (APIENTRY *glBindAttribLocation_t) (GLuint program,
GLuint index, const GLchar *name);
typedef void (APIENTRY *glActiveTexture_t) (GLenum texture);
-#endif
+#endif // __native_client__
+
typedef GLint (APIENTRY *glGetAttribLocation_t) (GLuint program,
const GLchar *name);
typedef void (APIENTRY *glUniform3f_t) (GLint location,
@@ -215,9 +216,9 @@ typedef void (APIENTRY *glDebugMessageCallback_t) (GLDEBUGPROC_t callback,
#ifdef WIN32
typedef const char* (APIENTRY * wglGetExtensionsString_t) (HDC hdc);
-#else
+#else // WIN32
#define CALLBACK
-#endif
+#endif // WIN32
#endif // USE_OPENGL
#endif // RENDER_OPENGL_MGLTYPES_H
diff --git a/src/render/opengl/opengldebug.h b/src/render/opengl/opengldebug.h
index 8d2f19e18..ebd449795 100644
--- a/src/render/opengl/opengldebug.h
+++ b/src/render/opengl/opengldebug.h
@@ -30,9 +30,9 @@ RENDER_OPENGL_MGL_H
mglPushGroupMarker(sizeof(text), text);
#define GLDEBUG_END() if (mglPopGroupMarker) \
mglPopGroupMarker();
-#else
+#else // defined(DEBUG_OPENGL) && defined(USE_OPENGL)
#define GLDEBUG_START(text)
#define GLDEBUG_END()
-#endif
+#endif // defined(DEBUG_OPENGL) && defined(USE_OPENGL)
#endif // RENDER_OPENGL_OPENGLDEBUG_H