![]() |
|
Problem with allegro_gl_flip(); |
Sophat Pheng
Member #5,774
April 2005
|
I just compile Allegro 4.2.1 and AllegroGL 0.4.1 with mingw32 3.4.2. I'm using MSVC8 so I built them with the "fix msvc8" command. I built a debug version as well. Instead of generating agl.lib and agld.lib, it generated agl_s.lib and agld_s.lib. (static?) Anyway, I linked to those libraries and I tried running this example provided with AllegroGL.
The application crashed when calling allegro_gl_flip(); I stepped into it and it goes there void allegro_gl_flip(void) { __allegro_gl_driver->flip(); } where __allegro_gl_driver is NULL. Any ideas? Thanks! |
Kitty Cat
Member #2,815
October 2002
![]() |
Check all return values of functions that can fail. One of them is failing, but you're assuming they don't. -- |
Sophat Pheng
Member #5,774
April 2005
|
As you said, this call fails. It actually fails right from the start. int install_allegro_gl(void) { if (!system_driver) return -1; // ... Why is that? |
Richard Phipps
Member #1,632
November 2001
![]() |
Do you have the latest OpenGL drivers installed on your machine? |
Sophat Pheng
Member #5,774
April 2005
|
I think I have OpenGL driver Version 6.14.10.6347 that comes with my graphic card drivers. I don't think it is the latest but it should not be that old either. Should I get the latest? |
Richard Phipps
Member #1,632
November 2001
![]() |
Can you give us some details on your graphic card? Some gfx cards have no or poor OpenGL drivers. It is normally always a good idea to update to the latest drivers to improve poor ones.. |
Milan Mimica
Member #3,877
September 2003
![]() |
Sophat: I'd say that allegro_init(); also failed.
-- |
Sophat Pheng
Member #5,774
April 2005
|
I have a All-In-Wonder Radeon 9800 128MB. Milan : Why would you say that ? By the way, I can run the examples built with AllegroGL. |
Milan Mimica
Member #3,877
September 2003
![]() |
Because "system_driver" is a allegro variable initialized at allegro_init().
-- |
Sophat Pheng
Member #5,774
April 2005
|
It is the first time I've built AllegroGL myself. Also when I stepped into allegro_init(); "system_driver" was definitely and allegro_init() returns 0. From my watch window : I am getting very confuse. Thanks for any inputs. |
Milan Mimica
Member #3,877
September 2003
![]() |
Hm, I used to see that when symbols from DLL where not imported correctly... But I can't see anything wrong here. edit: You are using Allegro as a DLL, right?
-- |
Sophat Pheng
Member #5,774
April 2005
|
Solved. You were right. I remove alld.lib from the dependencies. Thanks a lot for your help and patience |
|