From e12c3cac3be8b7d7936e7c51d325b8e313abfe6c Mon Sep 17 00:00:00 2001 From: Oliver Schinagl Date: Tue, 8 Jan 2008 16:05:54 +0000 Subject: opengl pre 1.2 compatiblity sorta --- Smoke/renderer_gl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Smoke/renderer_gl.c b/Smoke/renderer_gl.c index 4864c25..2cdff79 100644 --- a/Smoke/renderer_gl.c +++ b/Smoke/renderer_gl.c @@ -9,6 +9,9 @@ #include #include +#ifndef GL_VERSION_1_2 +#include +#endif #include @@ -155,6 +158,7 @@ static void render_grid(void) DIM = fluids_get_dim(); glColor3f(0.0f, 0.0f, 0.5f); + glLineWidth(1.0f); for (i = 0; i < winWidth; i += DIM) { if (i) { @@ -337,7 +341,7 @@ GLuint LoadTextures(char *filename) glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); - gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB, width, height, GL_RGB, GL_UNSIGNED_BYTE, imagedata); + gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB, width, height, GL_BGR, GL_UNSIGNED_BYTE, imagedata); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); return_value = texture; -- cgit v0.12