nythrix's picture

GL3 forward compatible context

I'm glad Inertia mentioned this:
...
But there is also a big decision coming with GL3. Forward compatible contexts.
The way I understood the manual, a forward compatible context will generate invalid-operation errors whenever you call e.g. glVertex3f(). The solutions I see for this are
a) Use compiler conditionals to compile OpenTK either against GL 2.1 or GL 3.0
b) Don't do anything at all. Let the user sort out what's allowed in GL3+ contexts.
c) completely remove legacy extensions and functions. Set GL3.0 as standard.
...

See: http://www.opentk.com/node/490#comment-2414

The discussion definitely needs it's own thread. From my point of view (1/3 way to alpha, mid-sized project) I would very much prefer number three. It will probably break almost all of my code but I'd rather fix a bunch of syntax errors than a single runtime one.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Inertia's picture

GLSL is not assembler. It's a C-like language and given the very limited input/output options you have, it's not really that complex.

Would you mind returning to the original topic, or start a new topic for GLSL discussion? Although it's not completely unrelated, it does not really help the decision how to handle forward compatible contexts (or whether it should be done at all). Thanks.

objarni's picture

I'm sorry for beeing off-topic, guess I slid a bit..

nythrix's picture

Anyways, OpenGL IS expected to break direct backward compatibility and I don't think OpenTK should go against this. Keep legacy somewhere but state clearly it might disappear in the future.

Inertia's picture

Don't want the ball being dropped, so going to bump this.

3. How many users are interested in programming against "normal" vs. "forward" contexts? How many would like to support hardware that cannot run OpenGL 2.1 or higher (i.e. where shaders-only won't work)?

I'd really like to hear more opinions (at least) to this point of the list, it would help alot if there would show a trend what you people really do need for your projects.

kanato's picture

I would like to maintain support for older hardware for a while longer. I remember looking at video cards about 1.5 years ago, and seeing that the OpenGL support for most of them was only 1.5, even though they had Direct3D 9 support, so it seemed like the OpenGL drivers were mostly a bit behind Direct3D support. Maybe most of them are like my mac mini which I bought at the beginning of 2007 that say they only support up some version of OpenGL (like 1.2) but have support for some of the features of newer OpenGL versions, but it's not totally clear to me at least what that means. So I'd be afraid that if we cut out everything below OpenGL 2.1, that support for hardware that's only two years old would be compromised.

nythrix's picture

[vote]
I will rely on GL3+ as soon as possible. I don't want to count on any older version, targeting 2010 and beyond for my project
[/vote]

the Fiddler's picture

My current project is developed with GL3 in mind. It does use a few deprecated features right now (e.g. built-in uniforms), but I'm gradually stripping these out. Driver bugs notwithstanding, I hope to switch to forward compatible GL3 by December.

Edit: Let's vote our opinion at the front page.

JTalton's picture

I'm all for change. While I do want to support older hardware, I also want to use the latest API. So for me I will probably put in a layer that abstracts the functionality that I need, allowing it to run on both the old API and the new API.

george's picture

I just want to add another voice in support of all the old crud. As far as writing games go, I'm all for ditching the old stuff, but for people (like me) writing cad type tools there are still many useful things in OpenGL 1.2.
For example implementing selection via occlusion queries is certainly possible, but it's definitely not a single day sort of job. Display Lists may be outdated, but if your geometry is changing topolgy from frame to frame they're still a beter fit than VBOs.
Finally, there are still a great many computers being sold right now that only support OpenGL1.5, so I wouldn't want my app to require anything more than that for now.
Having said all that, I'd be fine with a separate dll.

the Fiddler's picture

Display Lists may be outdated, but if your geometry is changing topolgy from frame to frame they're still a beter fit than VBOs.
Isn't that backwards? You can update a VBO, but you cannot modify a display list.

Finally, there are still a great many computers being sold right now that only support OpenGL1.5, so I wouldn't want my app to require anything more than that for now.
Do you know were we can find statistics on that?

Intel finally released GL2.0 drivers back in July and almost noone buys Matrox/Via/Sis anymore. Nettops and Atom systems besides (why would you run CAD on those?), I thought all new systems would be GL2-capable.