Login  Register

Re: Cross platform GLSL (ES)?

Posted by io7m on Dec 14, 2013; 12:27am
URL: https://forum.jogamp.org/Cross-platform-GLSL-ES-tp4030871p4030894.html

The list of differences is long and frustrating! A *lot* of them are functions taking a subset of the available
GLEnum values (which is irritating, as they're not compile-time errors). Some functions are simply not present.
Some of it is just outright incompatible behaviour that doesn't match that of any other OpenGL version.

Off the top of my head:

glTexImage* requires that the "format" and "internalformat" parameters must match, and can only be one of
GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA. This is incompatible with every other
OpenGL version.

The restrictions on attribute types, as described earlier.

The restrictions on the number of framebuffer color attachments, as described earlier.

A complete lack of any concept of "read" framebuffers; the result is actually a subset of 3.0 and the four
framebuffer extensions JOGL uses to give equivalent behaviour on 2.1 (GL_ARB_framebuffer_object |  GL_EXT_framebuffer_object, GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_blit, GL_EXT_packed_depth_stencil).

An amusing one is the stencil buffer: The majority of implementations don't support separate depth and stencil
framebuffer attachments, so you're required to use GL_OES_packed_depth_stencil to actually get a stencil buffer
at all (you're certainly not going to be doing any significant work rendering without a depth buffer).

I can't seem to remember any more. These are mostly things I've been working around for some eighteen
months in http://mvn.io7m.com/jcanephora...