What GLSL keywords do C represent?

So we have in C:

auto if break int case long char register
continue return default short do sizeof 
double static else struct entry switch extern
typedef float union for unsigned 
goto while enum void const signed volatile

What new keywords does OpenGL (ES) Shader Language provide us?

I am new to GLSL and I want to create a highlight for ease of use .

Math words included in GLSL will be considered keywords ..?

+3
source share
2 answers

You probably want to get the OpenGL ES GLSL specification. Section 3.3 lists the keywords (plus a few reserved words that aren't keywords, but you shouldn't use them anyway, so they probably deserve some sort of color coding).

Edit: Sorry, I did not find the link. My apologies. Current specifications:

OpenGL 4.1 GLSL
OpenGL ES 2.0 GLSL

+3

( , ) :

mat2 mat3 mat4 dmat2 dmat3 dmat4 mat2x2 mat2x3 mat2x4 dmat2x2 dmat2x3 dmat2x4 mat3x2 mat3x3 mat3x4 dmat3x2 dmat3x3 dmat3x4 mat4x2 mat4x3 mat4x4 dmat4x2 dmat4x3 dmat4x4 vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 dvec2 dvec3 dvec4 uvec2 uvec3 uvec4 lowp mediump highp sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow samplerCubeShadow sampler1DArray sampler2DArray sampler1DArrayShadow sampler2DArrayShadow isampler1D isampler2D isampler3D isamplerCube isampler1DArray isampler2DArray usampler1D usampler2D usampler3D usamplerCube usampler1DArray usampler2DArray sampler2DRect sampler2DRectShadow isampler2DRect usampler2DRect samplerBuffer isamplerBuffer usamplerBuffer sampler2DMS isampler2DMS usampler2DMS sampler2DMSArray isampler2DMSArray usampler2DMSArray samplerCubeArray samplerCubeArrayShadow isamplerCubeArray usamplerCubeArray

( ):

class union enum typedef inline noinline volatile , hvec2 hvec3 hvec4 fvec2 fvec3 fvec4 sampler3DRect image1D image2D image3D imageCube iimage1D iimage2D iimage3D iimageCube uimage1D uimage2D uimage3D uimageCube image1DArray image2DArray iimage1DArray iimage2DArray uimage1DArray uimage2DArray image1DShadow image2DShadow image1DArrayShadow image2DArrayShadow imageBuffer iimageBuffer uimageBuffer sizeof cast row_major

+6

All Articles