|
Does AllegroGL work in Windows? |
James Stanley
Member #7,275
May 2006
|
I finally got all my stuff installed and compiling. Eventually I found out that this block is the offending one, so it is presumable a problem with set_gfx_mode(): if(set_gfx_mode(GFX_OPENGL_WINDOWED, 640, 480, 0, 0) != 0) { if(set_gfx_mode(GFX_OPENGL_FULLSCREEN, 640, 480, 0, 0) != 0) { allegro_message("Video error. Allegro said: %s\n", allegro_error); return 1; } } So, does AllegroGL work in Windows? Or have I done something wrong? |
psycho
Member #5,042
September 2004
|
OpenGL is compatible with nearly every platform possible ;-) You must have missed the install_allegro_gl() call, try this code and it should work:
(copied from http://allegrogl.sourceforge.net/quickstart.txt) Otherwise, send more code please. |
James Stanley
Member #7,275
May 2006
|
I did install_allegro_gl().
EDIT: Removed opengl_init() because the crash is before that. |
Milan Mimica
Member #3,877
September 2003
|
You should remove set_color_depth(32). But I don't think that causes a crash. Can you compile a debug version of the library and find out with gdb where exactly it crashes? Are you using AllegroGL 0.4.1?
-- |
Sirocco
Member #88
April 2000
|
Yeah, it works in windows. Look at the example programs for how to set up a basic OpenGL program. If those run correctly then you're missing a critical call like install_allegro_gl() or something similar. --> |
James Stanley
Member #7,275
May 2006
|
I put set_color_depth() in because the map loader generates allegro BITMAP's and converts them to OpenGL textures. I am using AllegroGL version '0.2.5 CVS 20050308', it's the DevPak that I got in Dev-Cpp. I didn't notice it was so old when I installed it. I'll see if I can get a newer version. Not got a clue about the graphics card, but it's onboard so it's probably i810. EDIT: EDIT2: EDIT3: |
Milan Mimica
Member #3,877
September 2003
|
Yeah, there were such bugs back in 2005. Always use the latest!
-- |
James Stanley
Member #7,275
May 2006
|
Milan said: Always use the latest! Heh. Sorry. I assumed that, like most repositories, they kept it up to date. Now I realise that with Dev-C++, never assume anything. |
|