Advertisement

Use shader with old OpenGL context

Started by September 21, 2019 09:02 AM
2 comments, last by Shaarigan 5 years, 2 months ago

Hello. Long time no see..

Anybody knows is it possible to use shaders without actually using modern GL rendering context?
I mean use some shader code with for example: OpenGL 2.0 ?
Confusing but i have seen some old "legit" OpenGL code with some shader stuff in it.
Or its not possible because of "context" ? I mean older context can't deal with modern stuff and modern code can't affect the old 1.1 commands?


Lets say my app is using 1.1 API only and i want to add shader lighting into it. Not possible?
I have a 1.1 app and would like to add some shader lighting to it. if its not possible then i should rewrite my whole program using modern OPENGL?
Its a 3D map editor

I can say nothing to the old glBegin etc. stuff, but according to the timeline glsl with vertex- and fragment shadersl was introduced in 2.0, maybe as an extension. As well as draw buffers and vertex arrays.

But i don't think you'll be lucky with a 1.1 context ...

Maybe one should be prepared that support for the old way may fade out in the future. The new nvidia driver 430 told me it doesn't support anything older than a gtx6xx any more, or i'd have to install manually ...

Advertisement

GL 2.0 introduced Shading Language 1.10 specs and so perfectly supports the basic shaders: vertex and fragment. Geometry may be introduced in 2.0 too but tesslations is all way a modern feature. You won't have shader support with anything odler than GL2.0.

If you create the basic context for GL usage, you'll always get a context that supports the minimum feater set because going into core is an extension feature you have to load first before creating the GL context (Chicken <-> Egg Problem). You can't decide to have a GL1.1 App by your own, the driver will decide this for you and you have to check the real version number at runtime

This topic is closed to new replies.

Advertisement