Shader Flags

From GiderosMobile
Revision as of 15:30, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")

Shader.FLAG_NO_DEFAULT_HEADER

Suppress the automatic addition of a default header for GLSL programs.

The default header for a desktop OpenGL is: <syntaxhighlight lang="c">

  1. version 120
  2. define highp
  3. define mediump
  4. define lowp

</source>

And for OpenGL ES 2.0: <syntaxhighlight lang="c">

  1. version 100
  2. define GLES2

</source>

Shader.FLAG_FROM_CODE

The string contains Shader code rather than the filename of the shader file.