Difference between revisions of "Shader Flags"

From GiderosMobile
(Created page with "A single flag is currently defined. Shader.FLAG_NO_DEFAULT_HEADER : Suppress the automatic addition of a default header for GLSL programs. The default header for a desktop O...")
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
A single flag is currently defined.
+
__NOTOC__
 +
'''Available since:''' Gideros 2015.06.30<br/>
 +
'''Class:''' [[Shader]]<br/>
  
Shader.FLAG_NO_DEFAULT_HEADER : Suppress the automatic addition of a default header for GLSL programs.
+
=== Description ===
 +
'''Shader.FLAG_NO_DEFAULT_HEADER'''
 +
 
 +
Suppress the automatic addition of a default header for GLSL programs.
  
 
The default header for a desktop OpenGL is:
 
The default header for a desktop OpenGL is:
<source lang="c">
+
<syntaxhighlight lang="c">
 
#version 120
 
#version 120
 
#define highp
 
#define highp
 
#define mediump
 
#define mediump
 
#define lowp
 
#define lowp
</source>
+
</syntaxhighlight>
  
 
And for OpenGL ES 2.0:
 
And for OpenGL ES 2.0:
<source lang="c">
+
<syntaxhighlight lang="c">
 
#version 100
 
#version 100
 
#define GLES2
 
#define GLES2
</source>
+
</syntaxhighlight>
 +
 
 +
'''Shader.FLAG_FROM_CODE'''
 +
 
 +
The string contains Shader code rather than the filename of the shader file.
 +
 
 +
{{Shader}}

Latest revision as of 22:00, 4 November 2023

Available since: Gideros 2015.06.30
Class: Shader

Description

Shader.FLAG_NO_DEFAULT_HEADER

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

The default header for a desktop OpenGL is:

#version 120
#define highp
#define mediump
#define lowp

And for OpenGL ES 2.0:

#version 100
#define GLES2

Shader.FLAG_FROM_CODE

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