Skip to content
Permalink
Browse files

remove GLEW_STATIC #define

needed only when building the lib, not when linking to it
  • Loading branch information...
rt
rt committed Apr 27, 2019
1 parent c616ebe commit 5defdc695119e723dd528b682be0daf62b4b7dc6
Showing with 4 additions and 15 deletions.
  1. +1 −5 CMakeLists.txt
  2. +0 −1 rts/Rendering/GL/myGL.h
  3. +3 −9 rts/lib/headlessStubs/glewstub.c
@@ -156,11 +156,7 @@ else (UNIX AND NOT MINGW)
add_definitions(-DWIN32)
endif()

if(MSVC)
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
set(GLEW_STATIC ON)
set(EXE_FLAGS WIN32)
else()
if(NOT MSVC)
include_directories(rts/lib/mingw-std-threads)
endif()
endif (UNIX AND NOT MINGW)
@@ -3,7 +3,6 @@
#ifndef _MY_GL_H
#define _MY_GL_H

#define GLEW_STATIC
#ifndef NOMINMAX
#define NOMINMAX
#endif
@@ -13,23 +13,17 @@
extern "C" {
#endif

//#include <stdio.h>
#include <assert.h>

const GLubyte* glewGetString(GLenum name) {
//printf( "glewGetString()" );
if (name == GLEW_VERSION) {
return (const GLubyte*) "spring headless stub GLEW version";
} else {
return (const GLubyte*) "GL_ARB_multitexture GL_ARB_texture_env_combine GL_ARB_texture_compression";
}
assert(name == GLEW_VERSION);
return (const GLubyte*) "spring headless stub GLEW version";
}

GLboolean glewIsSupported(const char* name) { return GL_FALSE; }
GLboolean glewIsExtensionSupported(const char* name) { return GL_FALSE; }

GLenum glewInit() {
//printf( "glewInit()\n" );

return 0;
}

0 comments on commit 5defdc6

Please sign in to comment.
You can’t perform that action at this time.