diff options
author | Wilrik de Loose <wilrik@wilrik.nl> | 2008-04-16 15:04:46 (GMT) |
---|---|---|
committer | Wilrik de Loose <wilrik@wilrik.nl> | 2008-04-16 15:04:46 (GMT) |
commit | 7e5ef59c21af27e98f2a50b076d3b73882929768 (patch) | |
tree | 963750c591d26e4351accaebfadbfe07b58a3609 /menu_demo/bitmap.c | |
parent | 3956e14034371e778e7457a344adc66d27f5fc0a (diff) | |
download | 2iv55-7e5ef59c21af27e98f2a50b076d3b73882929768.zip 2iv55-7e5ef59c21af27e98f2a50b076d3b73882929768.tar.gz 2iv55-7e5ef59c21af27e98f2a50b076d3b73882929768.tar.bz2 |
Buttons werkend. Nu nog radio buttons en dergelijke + font/bitmap lettertype toevoegen (en afhandeling van buttons uiteraars.
Diffstat (limited to 'menu_demo/bitmap.c')
-rw-r--r-- | menu_demo/bitmap.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/menu_demo/bitmap.c b/menu_demo/bitmap.c index a13943b..1a32f68 100644 --- a/menu_demo/bitmap.c +++ b/menu_demo/bitmap.c @@ -1,4 +1,9 @@ -#include <windows.h> +#ifdef G_OS_WIN32
+ #define WIN32_LEAN_AND_MEAN 1
+ #include <windows.h>
+ #define GL_BGR 0x80E0
+#endif + #include <GL/gl.h> #include <GL/glu.h> #include <stdio.h> @@ -11,7 +16,7 @@ #define BITMAP_WIDTH 0x12 #define BITMAP_HEIGHT 0x16 -void load_image(char *filename) +void BitmapLoad(char *filename) { GLuint texture; FILE *bitmap; @@ -41,7 +46,7 @@ void load_image(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); |