glText
glText copied to clipboard
Support OpenGLES
Greetings,
Is it possible to support OpenGLES 3?
Thank you, coast
Just as a note here. #5 adds OpenGL ES support, but I currently don't have a setup for testing it.
With modification to @ghost code, confirmed to work on the Quest 2. I had to use "#version 300 es\n" in the shaders instead of what ghost used to define the version.
Hi, thank you @vallentin for the library, I liked it!
I'm using it in my Game Engine and I just want to update that I got it working on OpenGL ES:
The necessary steps:
- Remove the "glBindFragDataLocation" line. This is not necessary and not supported.
- Change the shaders to use
#version 300 es
- Specify the float precision in the fragment shader by adding this line of code:
precision mediump float;
- Do not initialize the
uniform vec4 color;
in the fragment color (not supported).
And that was the only thing I had to do to make it work. I hope it helps! :)
(Tested it with Emscripten)
@UnidayStudio Thanks! But just a question, you say OpenGL ES but the screenshot shows a web browser and you mention Emscripten. Is it OpenGL ES, or is your code converted into using WebGL? :)
I keep getting: "error OpenGL header must be included prior to including glText header" despite opengles being defined before gltext. I've tried this both in headers and source file with the same result. How can this be fixed?