|
|
| AllegroGL help |
|
Richard Phipps
Member #1,632
November 2001
|
Do it soon before this thread disappears. |
|
Paladin
Member #6,645
December 2005
|
Ok so sorry to sound stupid, but what files am I dealing with exactly? I looked in the lib folder and all the folders are empty except for a delete.me file. I moved the header files if I recall, but it didn't seem to do anything. EDIT: Nevermind, I did a new project and it turns out I did install it. But unfortunately it still crashes. |
|
Richard Phipps
Member #1,632
November 2001
|
What alegroGL version string does your project now print out? |
|
Bob
Free Market Evangelist
September 2000
|
Ok, first, let's get your AGL version as reported by AGL itself. Then, I'll have to ask you to track down where AGL crashes. There might be an AGL bug that only manifests itself on your system. Most of us don't have Intel Integrated Graphics so it's difficult to debug this issue without your help. Thanks! -- |
|
Paladin
Member #6,645
December 2005
|
Ok I have this code
It returns the version as "0.4.0 RC4" and the code gets to allegro_message("Suggested color depths"); then it crashes. |
|
Bob
Free Market Evangelist
September 2000
|
Quote: he code gets to allegro_message("Suggested color depths"); then it crashes. Can you step in AllegroGL's win.c, function allegro_gl_win_init() and see where it crashes there? -- |
|
Paladin
Member #6,645
December 2005
|
What do you mean? Do you mean use that function in my code? I'm a little confused on the subject. |
|
Bob
Free Market Evangelist
September 2000
|
No. I mean use a debugger (or lots of printfs, whichever you prefer) and try to figure out where is AGL crashing. -- |
|
Richard Phipps
Member #1,632
November 2001
|
Ok, if you are new to debugging then do this: Add some printf("1"); printf("2"), etc.. to different lines in the allegro_gl_win_init() function that Bob describes. Recompile the AllegroGL lib and reinstall it. Run your program and make it open a console window (should be done normally, as one of the compile flags removes it) and see what number it gets upto in the console window. That should help narrow it down so it can be fixed. |
|
Paladin
Member #6,645
December 2005
|
So what do I need to include in the parameters to recompile allegrogl? Guys, I'm really sorry that I'm slow, I'm just new to all of this. |
|
Richard Phipps
Member #1,632
November 2001
|
Just do what you did before.. For mingw: fix mingw32, make and then make install. EDIT: Come on Brian. If you figure it out if will help you and other people trying to run AllegroGL / Openlayer games. |
|
Michael Austin
Member #7,608
August 2006
|
I will finish debugging this tomorrow, but for now here are the offending lines (from win.c): if (allegro_gl_extensions_GL.ARB_multisample) { glSampleCoverageARB(1.0, GL_FALSE); } Apparently, the variable allegro_gl_extensions_GL suggests that the Intel 915series chipset is capable of handling this Open GL extension, but it is not. I suspect that the extensions are being parsed improperly, but I ran out of time to verify this today. Tomorrow, I will try to find out the root of the problem, but for now, if you comment out the lines I copied above, you can at least get allegrogl to run. Michael Austin |
|
Bob
Free Market Evangelist
September 2000
|
Thank you for your help! -- |
|
Richard Phipps
Member #1,632
November 2001
|
Thank you too! I hope we can find the problem and fix it so AllegroGL can work on these chipsets. EDIT: I found this snippet of code for X at : http://www.ks.uiuc.edu/Research/vmd/doxygen/OpenGLDisplayDevice_8C-source.html 00058 // determine if all of the ARB multisample extension routines are available 00059 #if defined(GL_ARB_multisample) && defined(GLX_SAMPLES_ARB) && defined(GLX_SAMPLE_BUFFERS_ARB) 00060 #define USEARBMULTISAMPLE 1 00061 #endif Does this mean we need GLX extensions as well to use it for some chipsets? And this link might be useful: You probably know this already though.. Hope you can fix this one! |
|
Koiu Lpoi
Member #7,607
August 2006
|
I just ran into this little problem myself when sending a binary to a friend of mine on a laptop with the 915m chipset. I think we may have to put another branching point to detect this particular chipset, or we need to contact intel, as This piece of software crashed in a similar way on the test "Static VAO". Hope that helps! Drew |
|
Michael Austin
Member #7,608
August 2006
|
In the file "gl_ext_list.h" /* Get extension info for the rest of the lib */ # define AGL_EXT(name, ver) { \ allegro_gl_extensions_GL.name = \ allegro_gl_is_extension_supported("GL_" #name) \ || (allegro_gl_info.version >= ver && ver > 0); \ } # include "allegrogl/GLext/gl_ext_list.h" # undef AGL_EXT
To set However, the extension GL_ARB_multisample is apparently NOT available on this chipset (INTEL 915GM) allegro.log said:
OpenGL Version: 1.4.0 - Build 4.14.10.4332 GLU Version : 1.2.2.0 Microsoft Corporation subsequently, when allegrogl attempts to use the extension (in "win.c") if (allegro_gl_extensions_GL.ARB_multisample) { glSampleCoverageARB(1.0, GL_FALSE); } It crashes (and burns). Two possible solutions: OR 2. change line in "win.c" to read: if (allegro_gl_is_extension_supported("GL_ARB_multisample")){ glSampleCoverageARB(1.0, GL_FALSE); }
Michael Austin |
|
Richard Phipps
Member #1,632
November 2001
|
Thanks a lot Mike! Mike, Bob, which option do you recommend? I'll be changing my version of AllegroGL so that it works on this chipset. |
|
Bob
Free Market Evangelist
September 2000
|
We should do Option 3: Detect Intel 915G chipsets and force multisampling to be disabled. We alreday do this for ARB_texture_non_power_of_two. The fix would be in src/glext.c in function __allegro_gl_manage_extensions(void). -- |
|
Richard Phipps
Member #1,632
November 2001
|
For now I've implemented no. 2 and my game now works on a Intel 915 laptop. Can one of the AllegroGL devs post in the forum when this fix is applied to the CVS branch and I'll download. Also, I'm not sure if this problem applies to other Intel chipsets in that range..? Thanks Bob! |
|
Bob
Free Market Evangelist
September 2000
|
The problem with Option 2 is that it will work in Windows XP and under, but it will not necessarily work properly in Linux or Windows Vista. The extensions string does not need to contain things that are part of the core spec. -- |
|
Richard Phipps
Member #1,632
November 2001
|
So is this a bug in the OpenGL drivers for this Intel chipset? |
|
Milan Mimica
Member #3,877
September 2003
|
What does printf("%s", (const char*)glGetString(GL_VENDOR)); say? Should GL_ARB_multisample be disabled only for Intel 915G? I've seen AGL working fine on some other Intel chipsets (not sure which ones).
-- |
|
Richard Phipps
Member #1,632
November 2001
|
Milan: Quote:
OpenGL Version: 1.4.0 - Build 4.14.10.4332 GLU Version : 1.2.2.0 Microsoft Corporation Is that the vendor string you refered to? |
|
Michael Austin
Member #7,608
August 2006
|
Bob said: The problem with Option 2 is that it will work in Windows XP and under, but it will not necessarily work properly in Linux or Windows Vista. The extensions string does not need to contain things that are part of the core spec. I was wondering if you could point me at any documentation regarding this? I would like to learn more. Most of what I have read in regards to glGetString(GL_EXTENSIONS) merely mentions that it returns "A list of supported GL extensions." If they didn't mean "all supported extensions" it seems like there would be some documentation somewhere explaining which supported extensions would be in this list? edit I don't doubt you, I just would like to read more about this. Michael Austin |
|
Milan Mimica
Member #3,877
September 2003
|
Richard: yes that's it, thanks edit:
-- |
|
|
|