Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » AllegroGL help

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
AllegroGL help
Kitty Cat
Member #2,815
October 2002
avatar

Quote:

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?

I think it's because if something is part of the core spec, it's not technically an extension, and thus doesn't have to be listed.. but it's still available to use. So like, if you have a driver that supports OpenGL 2.0, everything in the OpenGL 2.0 spec is implied. The extensions only need to list what isn't included in the core spec for the supported version.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Richard Phipps
Member #1,632
November 2001
avatar

Milan: Can you just tell me the changes? I'm not having any luck with patches and MSYS. :P

Milan Mimica
Member #3,877
September 2003
avatar

1Index: src/glext.c
2===================================================================
3--- src/glext.c (revision 1132)
4+++ src/glext.c (working copy)
5@@ -630,6 +630,16 @@
6 }
7 }
8 }
9+
10+ /* Intel 915G chipsets do not support ARB_multisample even though they claim to be
11+ * OpenGL 1.4 compilant.
12+ */
13+ {
14+ const char *renderer = (const char*)glGetString(GL_RENDERER);
15+ if (strstr(renderer, "Intel 915G")) {
16+ allegro_gl_extensions_GL.ARB_multisample = 0;
17+ }
18+ }
19 }

I hope you can read patches. It's easy. File src/glext.c, line 630, add the code.

About the extension promotion, the OGL specs say:

Quote:

G.2 Promoting Extensions to Core Features
ARB extensions can be promoted to required core features in later revisions of
OpenGL. When this occurs, the extension specifications are merged into the core
specification. Functions and enumerants that are part of such promoted extensions
will have the ARB affix removed
GL implementations of such later revisions should continue to export the name
strings of promoted extensions in the EXTENSIONS string, and continue to support
the ARB-affixed versions of functions and enumerants as a transition aid.

If I understand that correctly, the promoted extension should still be listed in EXTENSIONS string, and can be accessed the same way before they were promoted, i.e. it should be backward compatible.

Richard Phipps
Member #1,632
November 2001
avatar

Thanks Milan! Hopefully this will work. :)

One thing: I'm not sure if any other 915x chipsets or 9xx chipsets are affected. Does anyone know?

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

If I understand that correctly, the promoted extension should still be listed in EXTENSIONS string, and can be accessed the same way before they were promoted, i.e. it should be backward compatible.

should != must. Even though it would be a (really) bad idea for compatibility reasons, they aren't required to.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Michael Austin
Member #7,608
August 2006

Well... I was doing some reading and thinking about what has been said on this thread, and I downloaded GLEW library. (http://glew.sourceforge.net/)

And I made a discovery:

glewinfo.txt said:

GL_ARB_multisample: MISSING
-------------------
glSampleCoverageARB: MISSING

However, the interesting part was back in the GL 1.3 spec, which said:

glewinfo.txt said:

GL_VERSION_1_3: OK
---------------
glActiveTexture: OK
glClientActiveTexture: OK
glCompressedTexImage1D: OK
glCompressedTexImage2D: OK
glCompressedTexImage3D: OK
glCompressedTexSubImage1D: OK
glCompressedTexSubImage2D: OK
glCompressedTexSubImage3D: OK
glGetCompressedTexImage: OK
glLoadTransposeMatrixd: OK
glLoadTransposeMatrixf: OK
glMultTransposeMatrixd: OK
glMultTransposeMatrixf: OK
glMultiTexCoord1d: OK
glMultiTexCoord1dv: OK
glMultiTexCoord1f: OK
glMultiTexCoord1fv: OK
glMultiTexCoord1i: OK
glMultiTexCoord1iv: OK
glMultiTexCoord1s: OK
glMultiTexCoord1sv: OK
glMultiTexCoord2d: OK
glMultiTexCoord2dv: OK
glMultiTexCoord2f: OK
glMultiTexCoord2fv: OK
glMultiTexCoord2i: OK
glMultiTexCoord2iv: OK
glMultiTexCoord2s: OK
glMultiTexCoord2sv: OK
glMultiTexCoord3d: OK
glMultiTexCoord3dv: OK
glMultiTexCoord3f: OK
glMultiTexCoord3fv: OK
glMultiTexCoord3i: OK
glMultiTexCoord3iv: OK
glMultiTexCoord3s: OK
glMultiTexCoord3sv: OK
glMultiTexCoord4d: OK
glMultiTexCoord4dv: OK
glMultiTexCoord4f: OK
glMultiTexCoord4fv: OK
glMultiTexCoord4i: OK
glMultiTexCoord4iv: OK
glMultiTexCoord4s: OK
glMultiTexCoord4sv: OK
glSampleCoverage: OK

Which, got me thinking... If it was upgraded to Core in 1.3 and Intel failed to maintain backwards compatibility (by defining glSampleCoverageARB()), perhaps just using "glSampleCoverage" would work.

Sure enough I changed the lines in "win.c"
from -

  if (allegro_gl_extensions_GL.ARB_multisample) {
    glSampleCoverageARB(1.0, GL_FALSE);
  }

to -

  //if (allegro_gl_extensions_GL.ARB_multisample) {
    glSampleCoverage(1.0, GL_FALSE);
  //}

And... it worked.

So, my theory seems to be correct, that Intel chipset does support the command (glSampleCoverage), but not the compatibility version of the command (glSampleCoverageARB).

Michael Austin

Milan Mimica
Member #3,877
September 2003
avatar

Will glSampleCoverage work on OGL < 1.3?

Michael Austin
Member #7,608
August 2006

I am no expert, but probably not.

Michael Austin

Bob
Free Market Evangelist
September 2000
avatar

Here's one possiblity to fix this in AllegroGL:

/* On platforms where glSampleCoverageARB is a function pointer, ONLY */
if (glSampleCoverage && !glSampleCoverageARB) {
    glSampleCoverageARB = glSampleCoverage;
}

--
- Bob
[ -- All my signature links are 404 -- ]

Milan Mimica
Member #3,877
September 2003
avatar

Michael, are there other extensions which may require the same fix, CompressedTexImage2D for example?

Kitty Cat
Member #2,815
October 2002
avatar

Curious.. should you hack AllegroGL to work with Intel's drivers, or should you fix Intel's drivers to work better?

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Richard Phipps
Member #1,632
November 2001
avatar

Those drivers seem to be for Linux, KC. I didn't think the windows drivers were open source?

Kitty Cat
Member #2,815
October 2002
avatar

Depends on how much code is shared between the two. Since this specific problem seems to be only due to missing API symbols, it's not inconceivable that the fix for Windows isn't very different than for Linux. And who knows. With open source drivers that can show you how to handle the hardware, open source drivers could pop up for other platforms, perhaps with better OpenGL support in Windows.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Milan Mimica
Member #3,877
September 2003
avatar

But is that a bug at all? This is the "should" part of the specification. It seems to be a AGL bug or a design flaw.

 1   2   3 


Go to: