From af2f4f8ab50a209502b929082b11a7a07e6c5499 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 4 Jul 2014 20:45:15 +0300 Subject: Fix code style. --- src/render/imagegraphics.cpp | 2 -- src/render/mgldefines.h | 1 + src/render/mglfunctions.h | 34 +++++++++++++++++++--------------- src/render/mglxinit.h | 6 +++--- 4 files changed, 23 insertions(+), 20 deletions(-) (limited to 'src/render') diff --git a/src/render/imagegraphics.cpp b/src/render/imagegraphics.cpp index b439fb0e4..d85c68a18 100644 --- a/src/render/imagegraphics.cpp +++ b/src/render/imagegraphics.cpp @@ -26,8 +26,6 @@ #include "main.h" -#include "resources/image.h" - #include "debug.h" ImegeGraphics::ImegeGraphics() : diff --git a/src/render/mgldefines.h b/src/render/mgldefines.h index 109744b91..d42dca853 100644 --- a/src/render/mgldefines.h +++ b/src/render/mgldefines.h @@ -88,6 +88,7 @@ #define GL_VERTEX_SHADER 0x8B31 #define GL_COMPILE_STATUS 0x8B81 #define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 #define GL_INFO_LOG_LENGTH 0x8B84 #endif diff --git a/src/render/mglfunctions.h b/src/render/mglfunctions.h index 59f05e190..900042710 100644 --- a/src/render/mglfunctions.h +++ b/src/render/mglfunctions.h @@ -36,23 +36,27 @@ reinterpret_cast(name)) #endif -#define assignFunction(func, name) m##func \ - = reinterpret_cast(getFunction(name)); \ - if (m##func == nullptr) \ - logger->log(std::string("function not found: ") + name); \ - else \ - logger->log(std::string("assigned function: ") + name); - -#define assignFunctionEmu(func, name) m##func \ - = reinterpret_cast(getFunction(name)); \ - if (m##func == nullptr) \ +#define assignFunction(func, name) \ { \ - m##func = emu##func; \ - logger->log(std::string("emulated function: ") + name); \ - } \ - else \ + m##func = reinterpret_cast(getFunction(name)); \ + if (m##func == nullptr) \ + logger->log(std::string("function not found: ") + name); \ + else \ + logger->log(std::string("assigned function: ") + name); \ + } + +#define assignFunctionEmu(func, name) \ { \ - logger->log(std::string("assigned function: ") + name); \ + m##func = reinterpret_cast(getFunction(name)); \ + if (m##func == nullptr) \ + { \ + m##func = emu##func; \ + logger->log(std::string("emulated function: ") + name); \ + } \ + else \ + { \ + logger->log(std::string("assigned function: ") + name); \ + } \ } #define emulateFunction(func) m##func = emu##func; \ diff --git a/src/render/mglxinit.h b/src/render/mglxinit.h index 4322a7d0f..47622e7cc 100644 --- a/src/render/mglxinit.h +++ b/src/render/mglxinit.h @@ -18,8 +18,8 @@ * along with this program. If not, see . */ -#ifndef RENDER_MXGLINIT_H -#define RENDER_MXGLINIT_H +#ifndef RENDER_MGLXINIT_H +#define RENDER_MGLXINIT_H #include "main.h" #if defined(USE_OPENGL) && defined(USE_X11) @@ -30,4 +30,4 @@ namespace Glx } // namespace Glx #endif // defined(USE_OPENGL) && defined(USE_X11) -#endif // RENDER_MXGLINIT_H +#endif // RENDER_MGLXINIT_H -- cgit v1.2.3-60-g2f50