summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-05-29 17:50:23 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-05-29 17:50:23 +0200
commit7eef76b9e5b54f36e68c7e267aa62124f6022b70 (patch)
treeea2f70cd243b67ca36da69d6c071da28a5490766
parente39d44e9dc47bb3f8a77955768e3599ec0ed30be (diff)
Misc fixes for win32 and cross-compiling.
-rw-r--r--SConstruct3
-rw-r--r--gl.cpp2
-rw-r--r--gl.h1
3 files changed, 5 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index f140665..487be82 100644
--- a/SConstruct
+++ b/SConstruct
@@ -16,6 +16,7 @@ if GetOption('mingw32'):
env.Append(LIBS = ['CEGUIOpenGLRenderer', 'CEGUIBase', 'CEGUITGAImageCodec', 'CEGUITinyXMLParser', 'CEGUIFalagardWRBase', 'CEGUISILLYImageCodec',
'SDL_image', 'ftgl', 'freetype-s', 'z', 'pcre', 'opengl32', 'glu32', 'winmm', 'mingw32', 'SDLmain', 'SDL', 'jpeg', 'noise',
'lua', 'tolua++_Static', 'boost_filesystem-mt-s', 'boost_system-mt-s'])
+ env.Append(LINKFLAGS = ['-static-libgcc', '-static-libstdc++'])
env['CXX'] = 'i486-mingw32-g++'
else:
env.Append(LIBS = ['GL', 'GLU', 'noise', 'boost_filesystem', 'tolua++', 'lua'])
@@ -36,6 +37,6 @@ Export('env')
env.SConscript('scripting/SConscript')
-env.Program('foo', Glob('*.cpp') + ['noiseutils/noiseutils.cpp'] + Glob('widgets/*.cpp') + Glob('scripting/*.cpp'))
+env.Program('foo.exe' if GetOption('mingw32') else 'foo', Glob('*.cpp') + ['noiseutils/noiseutils.cpp'] + Glob('widgets/*.cpp') + Glob('scripting/*.cpp'))
# vim: syn=python
diff --git a/gl.cpp b/gl.cpp
index 9cefa53..a14ae44 100644
--- a/gl.cpp
+++ b/gl.cpp
@@ -14,6 +14,7 @@ GLboolean (APIENTRY *glUnmapBuffer)(GLenum);
/* uniform */
GLint (APIENTRY *glGetUniformLocation)(GLuint, const GLchar*);
void (APIENTRY *glUniform1i)(GLint, GLint);
+void (APIENTRY *glUniform1f)(GLint, GLfloat);
void (APIENTRY *glUniform2f)(GLint, GLfloat, GLfloat);
void (APIENTRY *glUniform3f)(GLint, GLfloat, GLfloat, GLfloat);
void (APIENTRY *glUniform1iv)(GLint, GLsizei, const GLint*);
@@ -51,6 +52,7 @@ void win32_gl_init() {
glGetUniformLocation = (GLint(APIENTRY*)(GLuint, const GLchar*))SDL_GL_GetProcAddress("glGetUniformLocation");
glUniform1i = (void(APIENTRY*)(GLint, GLint))SDL_GL_GetProcAddress("glUniform1i");
+ glUniform1f = (void(APIENTRY*)(GLint, GLfloat))SDL_GL_GetProcAddress("glUniform1f");
glUniform2f = (void(APIENTRY*)(GLint, GLfloat, GLfloat))SDL_GL_GetProcAddress("glUniform2f");
glUniform3f = (void(APIENTRY*)(GLint, GLfloat, GLfloat, GLfloat))SDL_GL_GetProcAddress("glUniform3f");
glUniform1iv = (void(APIENTRY*)(GLint, GLsizei, const GLint*))SDL_GL_GetProcAddress("glUniform1iv");
diff --git a/gl.h b/gl.h
index 1bbd9a5..11bd691 100644
--- a/gl.h
+++ b/gl.h
@@ -19,6 +19,7 @@ extern GLboolean (APIENTRY *glUnmapBuffer)(GLenum);
/* uniform */
extern GLint (APIENTRY *glGetUniformLocation)(GLuint, const GLchar*);
extern void (APIENTRY *glUniform1i)(GLint, GLint);
+extern void (APIENTRY *glUniform1f)(GLint, GLfloat);
extern void (APIENTRY *glUniform2f)(GLint, GLfloat, GLfloat);
extern void (APIENTRY *glUniform3f)(GLint, GLfloat, GLfloat, GLfloat);
extern void (APIENTRY *glUniform1iv)(GLint, GLsizei, const GLint*);