Achilles-96 / freetype-gl

Automatically exported from code.google.com/p/freetype-gl
Other
0 stars 0 forks source link

make OpenGL Core compatible #55

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Would be great if it was OpenGL Core compatible, now it fails with e.g.: 
"OpenGL Error: Using glTexImage2D in a Core context with parameter <format> and 
enum '0x1906' which was removed from Core OpenGL (GL_INVALID_ENUM)"

Original issue reported on code.google.com by papal...@gmail.com on 17 Apr 2013 at 8:38

GoogleCodeExporter commented 8 years ago
Seems like changing one line (the one that caused the error message) in the 
code and one in the shaders seems to fix it, more specifically, simply replace 
"GL_ALPHA" in texture_atlas.c with "GL_RED" and use the .r (AKA .x) component 
in the shader and you're good.

Original comment by papal...@gmail.com on 18 Apr 2013 at 4:45

GoogleCodeExporter commented 8 years ago
Thanks however I still don't know if freetype-gl needs to go to 3.3 since it 
would prevent older version to run. Is the GL_ALPHA/GL_RED the only invalid 
line for 3.3 ?

Original comment by Nicolas.Rougier@gmail.com on 2 May 2013 at 9:55

GoogleCodeExporter commented 8 years ago
Yes, I believe that was the only change necessary in your library code. Now the 
code of the demos would of course need more changes.

Original comment by papal...@gmail.com on 3 May 2013 at 8:33

GoogleCodeExporter commented 8 years ago
Concerning backwards compatibility, wouldn't it be smarter to maybe smarter to 
remove all OpenGL dependencies altogether? Make it simply a library that mainly 
just spits out textures and UVs and caches them in the background. This way it 
would work with e.g. ancient OpenGL ES as well, hell, even DirectX!

Original comment by papal...@gmail.com on 3 May 2013 at 8:42

GoogleCodeExporter commented 8 years ago
Well, I would say no since the project is called "freetype-gl"....

More seriously, we need OpenGL stuff such that people can rapidly test/use the 
demos.

Original comment by Nicolas.Rougier@gmail.com on 5 May 2013 at 1:56