[1.10] GL3+ vs GL2

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
User avatar
Herb
Orc
Posts: 412
Joined: Thu Jun 04, 2009 3:21 am
Location: Kalamazoo,MI
x 38

[1.10] GL3+ vs GL2

Post by Herb »

So, I've been playing in 2.1 for awhile, but have projects that I've ported to 1.10 and will likely keep them there.

So, I've read through all the release notes on 1.10 and that GL3+ is working (tried it to with the samples). What I'm still a little confused about is when would you want to use GL3+ with 1.10 if you're not using Hlms? Or maybe you wouldn't? Wondering if 1.10 (with Hlms) and GL3+ can take advantage of anything in the newer OpenGL or not. If that's true, I'm guessing you'd stick with the GL2 render...

Lastly, if I'm using 1.10 with Hlms (and GL3+), I assume most of the API still functions the same (roughly) just the material/shader scripts change?

I did some forum searching already but couldn't find anything definite on these questions. Apologise if I missed the answer somewhere! Thanks!
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: [1.10] GL3+ vs GL2

Post by paroj »

advantages of GL3+ over GL ( OpenGL1.1+ actually):
- HardwareUniformBuffers
- Compute Shaders
- Tessellation Shaders
- Vertex Array Objects
- sized pixel formats
- separable shaders
- access to the OpenGL Core profile (glsl130+)

but if you do not need/ use any of these features, GL is actually good enough and probably be also slightly faster (as it does not have to generate shaders on the fly).
So we are currently not taking advantage of the newer OpenGL in 1.10. I want to look into that for 1.11, but the most important parts (indirect drawing) just came with OpenGL 4.

Regarding HLMS: it is pretty useless in 1.10, so much that it likely will be deprecated for 1.11. For GL3+ 1.10 uses the RTSS to generate the shaders. You can customize the output via material scripts as:
https://ogrecave.github.io/ogre/api/1.1 ... custom_mat
This works with the legacy GL renderer too though.

Also the plan is to stick with the RTSS for 1.x as its micro shader approach scales better then the Uber shader #ifdef thing of HLMS.
User avatar
Herb
Orc
Posts: 412
Joined: Thu Jun 04, 2009 3:21 am
Location: Kalamazoo,MI
x 38

Re: [1.10] GL3+ vs GL2

Post by Herb »

Thanks paroj for the details! This makes sense, and appreciate the info on just not messing with Hlms in 1.10.

Is there any examples of using GL3+ features in 1.10? Like an example of using VAOs for performance?
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: [1.10] GL3+ vs GL2

Post by paroj »

each time you create a VertexDeclaration, a VAO is created in the background on GL3+, so this one is transparent.

Then there are the Compute and Tessellation samples.
Post Reply