Skip to content

Commit

Permalink
remove GLEW_STATIC #define
Browse files Browse the repository at this point in the history
needed only when building the lib, not when linking to it
  • Loading branch information
rt committed Apr 27, 2019
1 parent c616ebe commit 5defdc6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
6 changes: 1 addition & 5 deletions CMakeLists.txt
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion rts/Rendering/GL/myGL.h
Expand Up @@ -3,7 +3,6 @@
#ifndef _MY_GL_H
#define _MY_GL_H

#define GLEW_STATIC
#ifndef NOMINMAX
#define NOMINMAX
#endif
Expand Down
12 changes: 3 additions & 9 deletions rts/lib/headlessStubs/glewstub.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 5defdc6

Please sign in to comment.