Page 1 of 1

OpenGL API Support

Posted: Wed Mar 27, 2013 4:39 am
by jazz
I think being able to call OpenGL 4.0 and OpenGL ES 2.0 functions in ZGE is a really powerful feature. However, though most of the API is exposed, it seems very little of it can be really used with ZGE.

I think there should be access to all graphics objects' handles (shaders, textures, framebuffers, vbo, etc).

Also, since ZGE allows an OpenGL 4.0 context, geometry and tessellation shaders would be a nice addition.

Re: OpenGL API Support

Posted: Wed Mar 27, 2013 12:14 pm
by Kjell
:?
jazz wrote:However, though most of the API is exposed, it seems very little of it can be really used with ZGE.
Not sure what you mean. You can use pretty much all of it ... apart from the functions that use doubles ( easily at least ).

K

Posted: Wed Mar 27, 2013 5:20 pm
by jazz
Hey Kjell,

Oh, is it all already possible to use most of ZGE components with the OpenGL API. Maybe I just couldn't figure it out. This is kinda a expansion of my previous thread.

I mean like since the shader handles aren't accessible, then all the glUniform and functions associated with it seems not possible to use.

If the other components handles are not exposed, how do I bind textures or frame buffers, or render a mesh using its vbo? It just seems like a lot more of the API could be used by having access the handles of internal components.

But maybe this can already be done, and I just don't know how. :lol:

Posted: Wed Mar 27, 2013 5:35 pm
by Kjell
Hi jazz,

Ah, you mean combining components and OpenGL calls like that. You'd need the handles for that yes.

Most handles can be retrieved using the glGet function though .. for example by using a UseMaterial component, and then "grabbing" the bound texture id's ( ugly solution, i know ). Alternatively you can always not use any components at all and do everything in OpenGL :wink:

K

Posted: Wed Mar 27, 2013 5:49 pm
by jazz
Kjell wrote:Most handles can be retrieved using the glGet function though .. for example by using a UseMaterial component, and then "grabbing" the bound texture id's ( ugly solution, i know ). Alternatively you can always not use any components at all and do everything in OpenGL
Ah, wasn't familiar with glGet.

But yeah, I just started using ZGE and it seemed like I could do everything in ZGE or everything in OpenGL. But I like ZGE a lot and think being able to use them more easily together would be really nice.

But anyway, Ville just added shader handles and separate matrices in ES shaders, so I'm happy at the moment. :D