ptitSeb / gl4es

GL4ES is a OpenGL 2.1/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android, Emscripten and AmigaOS4.
http://ptitseb.github.io/gl4es/
MIT License
668 stars 151 forks source link

[GLES3] Add simple wrapper for glVertexAttribIPointer() #367

Closed CosineMath closed 2 years ago

ptitSeb commented 2 years ago

Mmmm, I don't like adding wrappers without emulation fallback. I merge it, but this really need some more work. Also, this is OpenGL 3.x feature, wich gl4es doesn't support yet.

khanhduytran0 commented 2 years ago

Wait, glVertexAttribIPointer can be wrapped to glVertexAttribPointer, which is a GLES2 function.

ptitSeb commented 2 years ago

Maybe, with disabling Normalization. But some changes in the shaders will be needed anyway. Which this PM don't handle at all.

CosineMath commented 2 years ago

Emm, so what are wrappers with emulation fallback?

ptitSeb commented 2 years ago

Well, in that case, using glVertexAttirbPointer if glVertexAttribIPointer is not available. So that also mean checking if this function is available. And because it's only availbale when using GLES 3.x context and gl4es, for now, doesn't create or handle GLES 3.x context, it should never be available. (exept of course in your case, because you are using Android, the context is not created by gl4es, and so a GLES 3.x context is available)

CosineMath commented 2 years ago

Sorry... I don't know details of GL4ES much. I am working on an experimental shader converter. I tested GL4ES with the converter on desktop X11 and then found glVertexAttirbPointer missing. So I try to add a wrapper.

ptitSeb commented 2 years ago

Well, this function is only used with OpenGL 3.x shaders. Conversion to either GLES 3.x or GLES2.0 would be welcome.