glText icon indicating copy to clipboard operation
glText copied to clipboard

Support OpenGLES

Open ghost opened this issue 5 years ago • 5 comments

Greetings,

Is it possible to support OpenGLES 3?

Thank you, coast

ghost avatar Nov 03 '19 19:11 ghost

Just as a note here. #5 adds OpenGL ES support, but I currently don't have a setup for testing it.

vallentin avatar Feb 04 '20 14:02 vallentin

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.

calva117 avatar Jan 17 '23 22:01 calva117

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: Screenshot_81

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 avatar Apr 28 '23 14:04 UnidayStudio

@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? :)

vallentin avatar May 03 '23 12:05 vallentin

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?

rossmarinaro avatar Oct 13 '23 15:10 rossmarinaro