Browse Source

gpu: fix 32-bit compilation on Windows.

legacy
Sam Hocevar 5 years ago
parent
commit
7591962cb0
2 changed files with 14 additions and 6 deletions
  1. +8
    -6
      src/gpu/debug.cpp
  2. +6
    -0
      src/lol/base/features.h

+ 8
- 6
src/gpu/debug.cpp View File

@@ -49,9 +49,10 @@ static std::map<GLenum, char const *> gl_dbg_severity_to_str
{ GL_DEBUG_SEVERITY_NOTIFICATION, "notification" },
};

static void gl_debug(GLenum source, GLenum type, GLuint id,
GLenum severity, GLsizei length,
const GLchar *message, const void *user_param)
static void LOL_ATTR_STDCALL
gl_debug(GLenum source, GLenum type, GLuint id,
GLenum severity, GLsizei length,
const GLchar *message, const void *user_param)
{
std::string error;

@@ -74,9 +75,10 @@ static void gl_debug(GLenum source, GLenum type, GLuint id,
}

#if defined LOL_USE_GLEW && !defined __APPLE__
static void gl_debug_amd(GLuint id, GLenum category, GLenum severity,
GLsizei length, const GLchar* message,
GLvoid* user_param)
static void LOL_ATTR_STDCALL
gl_debug_amd(GLuint id, GLenum category, GLenum severity,
GLsizei length, const GLchar* message,
GLvoid* user_param)
{
gl_debug(GL_DEBUG_SOURCE_API, GL_DEBUG_TYPE_ERROR, id,
severity, length, message, user_param);


+ 6
- 0
src/lol/base/features.h View File

@@ -106,6 +106,12 @@
# define LOL_ATTR_FORMAT(n, p)
#endif

#if defined(_WIN32)
# define LOL_ATTR_STDCALL __stdcall
#else
# define LOL_ATTR_STDCALL /* */
#endif

#ifdef LOL_FEATURE_CXX17_ATTRIBUTE_NODISCARD
# define LOL_ATTR_NODISCARD [[nodiscard]]
#else


Loading…
Cancel
Save