OpenGL 3.0, revisited

View: New views
11 Messages — Rating Filter:   Alert me  

OpenGL 3.0, revisited

by Paul Martz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all -- Here's my main question:
 
I recently obtained freeglut's current svn head, and it appears the the GLX code has been updated to allow forward compatible context creation - great! But this isn't done for Windows, as far as I can tell? If not, I'm more than willing to pitch in and code this support, but I don't want to step on anyone's feet. Is anyone actively working on this? What's the procedure for submitting modifications?
 
And here's the background info...
 
I'm a long-time OpenGL user, but new to freeglut and this list. I'm currently looking for a cross-platform test bed to develop a series of OpenGL 3.0 example programs for use in an OpenGL 3.0 course that I'll be teaching in the near future. Freeglut seems like a great candidate. (OSG is another possibility.)
 
I just read through the archives regarding OpenGL 3.0 support in freeglut and it looks like you've covered all the major issues. However, I'll add the following info to the discussion: The OpenGL 3.1 spec will be out very soon and it is highly likely that all he 3.0-deprecated functionality will be removed. If the 3.1 spec comes out in the next few weeks, 3.1-capable drivers are likely by SIGGRAPH.
 
I understand the quadric shapes, fonts, menus, etc., will require significant effort to port. Right now I'm just looking for cross-platform 3.x context creation; I'll cross the other bridges when I come to them, and would be glad to contribute my changes back to the project. I understand we don't want to break existing freeglut apps that will continue to open 2.x contexts.
 
Thanks,
 
Paul Martz
Skew Matrix Software LLC
+1 303 859 9466
 

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Parent Message unknown Re: OpenGL 3.0, revisited

by John F. Fay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Paul,

        Hello and welcome to "freeglut".  I think I'm the main Windows worker on
this library and let me assure you that you will not be stepping on my toes
with the forward-compatible context creation.  I am quite sure you won't be
stepping on anybody else's toes either.

        We don't have a formal procedure that I know of for submitting changes.
 Usually what happens is people send me stuff and I put it into SVN.

        The "freeglut" library is largely in maintenance mode for now.  We've been
expecting a new release any time now for the last several months.

        Steve Baker is the owner and copyright holder of "freeglut" and needs to
weigh in on policy issues, but the general idea is that "freeglut" is
designed to be a drop-in replacement for GLUT and to be a very small and
simple windowing library for small and simple demo programs in OpenGL.  So
it seems to be pretty much up your alley.  I don't know anything about OSG
so I cannot give you any comparisons.

                - John F. Fay


-----Original Message-----
From: Paul Martz
Sent: Monday, February 09, 2009 7:23 PM
To: Freeglut-Dev
Subject: [Freeglut-developer] OpenGL 3.0, revisited

Hi all -- Here's my main question:

I recently obtained freeglut's current svn head, and it appears the the GLX
code has been updated to allow forward compatible context creation - great!
But this isn't done for Windows, as far as I can tell? If not, I'm more
than
willing to pitch in and code this support, but I don't want to step on
anyone's feet. Is anyone actively working on this? What's the procedure for
submitting modifications?

And here's the background info...

I'm a long-time OpenGL user, but new to freeglut and this list. I'm
currently looking for a cross-platform test bed to develop a series of
OpenGL 3.0 example programs for use in an OpenGL 3.0 course that I'll be
teaching in the near future. Freeglut seems like a great candidate. (OSG is
another possibility.)

I just read through the archives regarding OpenGL 3.0 support in freeglut
and it looks like you've covered all the major issues. However, I'll add
the
following info to the discussion: The OpenGL 3.1 spec will be out very soon
and it is highly likely that all he 3.0-deprecated functionality will be
removed. If the 3.1 spec comes out in the next few weeks, 3.1-capable
drivers are likely by SIGGRAPH.

I understand the quadric shapes, fonts, menus, etc., will require
significant effort to port. Right now I'm just looking for cross-platform
3.x context creation; I'll cross the other bridges when I come to them, and
would be glad to contribute my changes back to the project. I understand we
don't want to break existing freeglut apps that will continue to open 2.x
contexts.

Thanks,

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com <http://www.skew-matrix.com/>
+1 303 859 9466

 << File: ATT00010.htm >>  << File: ATT00011.txt >>  << File: ATT00012.txt
>>


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Re: OpenGL 3.0, revisited

by Paul Martz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, John, pleased to meet you. I remember Steve from the
comp.graphics.api.opengl days.

I'll start plinking around with WGL_ARB_create_context.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Re: OpenGL 3.0, revisited

by Paul Martz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

FYI, I posted the modified files as a ZIP attachment, and my email is being
held for moderator approval.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Re: OpenGL 3.0, revisited

by Paul Martz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've sent my code directly to John. For the archives, here's the status and
my findings...
   -Paul


WGL isn't GLX, obviously, and one big difference is you must load the device
driver before you can query for supported WGL extensions, and the only way
to do this is to make a context current.

The existing freeglut code does this already in the case of multisampling.
While setting up the pixel format, it creates a dummy window and context,
makes them current, does what it needs to do for multisample, then deletes
the dummy window and context.

I do (sort of) the same thing as the multisampling code. After setting up
the pixel format, freeglut creates a corresponding context, but doesn't make
them current. With my changed code, right after context creation, freeglut
calls into a new function, fgNewWGLCreateContext, which does a make current
on the context and window, then queries for WGL_ARB_create_context. If
found, it calls into the extension to create the new context, does a
wglMakeCurrent(0,0), deletes the old context, and stores the new one in
Window.Context. The rest of freeglut is none the wiser, and happily makes
current with the new context that my code created.

I've verified this works with a minimal example that queries the extension
string and displays it. I get "3.0 NVIDIA 178.25".

Oddly, deprecated 2.x functionality still works; I didn't think it would.
I'll have to check the spec to see if this behavior is allowed.

My context creation code is a clone of the GLX code except I don't bother
displaying a warning if the app asks for a forward compatible context and
also asks for color index mode. I assume context creation would fail in that
case (though I haven't actually tested it).

If there's a place in freeglut for a "hello world 3.x" example, I can put
one together fairly quickly and submit it. Let me know if you're interested.

When you commit my changes, let me know and I'll "svn co" to verify. Also
let me know of any problems or anything I should redo.


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Re: OpenGL 3.0, revisited

by Sven Panne :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Donnerstag, 12. Februar 2009 16:03:51 schrieb Paul Martz:
> [...]
> I've verified this works with a minimal example that queries the extension
> string and displays it. I get "3.0 NVIDIA 178.25".
>
> Oddly, deprecated 2.x functionality still works; I didn't think it would.
> I'll have to check the spec to see if this behavior is allowed.

I am not sure if the OpenGL spec actually allows this, but I've read on
several occasions (in forums, presentations, etc., see e.g. page 199 of
http://www.slideshare.net/Mark_Kilgard/sigraph-asia-2008-modern-opengl-
presentation) that NVIDIA doesn't really believe that deprecating API entries
is the right way to go. It could very well be the case that their drivers do
not (and probably never will) honor the "forward compatible" part of the
GLX/WGL request. I do not agree with their point of view, but there is not
much one can do about that... :-( The main point is that the new OpenGL 3.0
stuff works with the new context creation API.

> [...]
> If there's a place in freeglut for a "hello world 3.x" example, I can put
> one together fairly quickly and submit it. Let me know if you're
> interested.

I think that a clean OpenGL 3.0 version of the famous smooth.c from the Red
Book (displaying a smooth shaded triangle) would be a good hello world
example. The best place for it would be somewhere below progs/demos. Another
options would be an OpenGL 3.0 version of cube.c.

Cheers,
   S.

------------------------------------------------------------------------------
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Parent Message unknown Re: OpenGL 3.0, revisited

by John F. Fay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, it's into SVN.

A simple demo--or even a modification to an existing demo--would be appropriate.

        - John


-----Original Message-----
From: Paul Martz
Sent: Wednesday, February 11, 2009 8:52 PM
To: 'FreeGLUT developers list'
Subject: Re: [Freeglut-developer] OpenGL 3.0, revisited


FYI, I posted the modified files as a ZIP attachment, and my email is being
held for moderator approval.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer




------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Re: OpenGL 3.0, revisited

by Sven Panne :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Freitag, 13. Februar 2009 04:23:12 schrieb John F. Fay:
> OK, it's into SVN. [...]

FYI: I've cleaned up the code a little bit and made one functional change: If
the GLUT API user has not called the new context creation functions at all (or
if the default values have been specified), the new WGL context creation API
is not called. This is consistent with the GLX behavior and a little bit more
defensive. Never trust a code path only few people use, especially not in
drivers... ;-)

Cheers,
   S.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Parent Message unknown Re: OpenGL 3.0, revisited

by John F. Fay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Very good, thank you very much.

I was going to write and ask you what all those SVN commits were about.

        - John


-----Original Message-----
From: Sven Panne
Sent: Saturday, February 14, 2009 4:51 AM
To: FreeGLUT developers list
Subject: Re: [Freeglut-developer] OpenGL 3.0, revisited


Am Freitag, 13. Februar 2009 04:23:12 schrieb John F. Fay:
> OK, it's into SVN. [...]

FYI: I've cleaned up the code a little bit and made one functional change: If
the GLUT API user has not called the new context creation functions at all (or
if the default values have been specified), the new WGL context creation API
is not called. This is consistent with the GLX behavior and a little bit more
defensive. Never trust a code path only few people use, especially not in
drivers... ;-)

Cheers,
   S.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer




------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Re: OpenGL 3.0, revisited

by Sven Panne :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Donnerstag, 12. Februar 2009 16:03:51 schrieb Paul Martz:
> [...]
> Oddly, deprecated 2.x functionality still works; I didn't think it would.
> I'll have to check the spec to see if this behavior is allowed. [...]

Small update: I am currently trying to write a a fully OpenGL-3.0-compliant
version of smooth.c from the Red Book, which should end up in freeglut's
progs/demos as a demo for the new glutInitContext* API entries. I've just
noticed that if you request a forward-compatible 3.0 context, NVIDIA's 180.29
Linux driver sets GL's error state to GL_INVALID_OPERATION for deprecated
stuff like glMatrixMode or glBegin! I think that this is great news, because
this shows more OpenGL 3.0 commitment from NVIDIA than I actually thought, and
one can actually start testing "pure" OpenGL 3.0.

Cheers,
   S.


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Re: OpenGL 3.0, revisited

by Sven Panne :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Freitag, 13. Februar 2009 04:23:12 schrieb John F. Fay:
> [...]
> A simple demo--or even a modification to an existing demo--would be
> appropriate.

FYI: I've just committed the last changes for a fully OpenGL-3.0-compliant
variant of the famous smooth.c from the Red Book. It would be good if other
people reviewed the code and tested it on a few platforms. I've tested it only
on openSUSE 11.1 x86_64 with NVIDIA's 180.29 drivers.

A few personal observations: Currently writing "pure" OpenGL 3.0 is a bit
tedious, because the information about what is deprecated and what the
intended replacements are is either scattered around various documents or does
not exist at all. Furthermore, some parts of the existing documentation is
almost incomprehensible, e.g. the parts of the specs describing gl_FragCoord
(deprecated, of course) and glBindFragDataLocation. :-P OpenGL 3.0 desperately
needs better documentation and lots of tutorials, otherwise its acceptance
will be quite low, I fear. Furthermore, some new official(!) GLU-like library
for basic matrix stuff, shader handling, extension loading, etc. would be
good, too, otherwise every "pure" OpenGL 3.0 code will contain quite a bit of
boring boilerplate code.

Cheers,
   S.


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer