8 #ifndef META_OCEAN_RENDERING_GLES_PROGRAM_MANAGER_H
9 #define META_OCEAN_RENDERING_GLES_PROGRAM_MANAGER_H
29 namespace GLESceneGraph
50 typedef std::map<ShaderCodes, GLESShaderRef>
ShaderMap;
55 typedef std::unordered_map<GLESAttribute::ProgramType, GLESShaderProgramRef>
ProgramMap;
This class implements a recursive lock object.
Definition: Lock.h:31
This class is the base class for all rendering engines like.
Definition: Engine.h:46
ProgramType
Definition of different shader functionalities.
Definition: GLESAttribute.h:43
This class implements a manager for OpenGL ES shader programs.
Definition: GLESProgramManager.h:37
void release()
Releases the shader manager.
static const char * programVertexShaderColorId_
Vertex shader code: PT_COLOR_ID.
Definition: GLESProgramManager.h:160
static const char * partOneTextureLookupRGBA32ToRGBA32_
The code part containing the macro to convert a 1-texture RGBA32 lookup to a RGBA32 value.
Definition: GLESProgramManager.h:127
GLESShaderProgramRef program(const Engine &engine, const GLESAttribute::ProgramType programType)
Returns a specified shader with the specified functionalities.
static const char * partDefinitionMaterial_
The code part defining the Material struct.
Definition: GLESProgramManager.h:148
static const char * programFragmentShaderMaterialTexture_
Fragment shader code: PT_MATERIAL | PT_TEXTURE_LOWER/UPPER_LEFT.
Definition: GLESProgramManager.h:214
static const char * partPlatform_
The code part containing platform specific information e.g., shader version.
Definition: GLESProgramManager.h:121
static const char * programVertexShaderMaterialLightTexture_
Vertex shader code: PT_MATERIAL | PT_LIGHT | PT_TEXTURE_LOWER/UPPER_LEFT | PT_TEXTURE_BGRA/RGBA:
Definition: GLESProgramManager.h:184
static const char * programFragmentShaderTwoTextures_
Fragment shader code for two textures.
Definition: GLESProgramManager.h:211
std::map< ShaderCodes, GLESShaderRef > ShaderMap
Definition of a map mapping shader codes to compiled shader objects.
Definition: GLESProgramManager.h:50
static const char * programFragmentShaderStaticColor_
Fragment shader code: PT_STATIC_COLOR.
Definition: GLESProgramManager.h:196
static const char * partTwoTexturesLookupY_VU12ToRGBA32_
The code part containing the macro to convert the 2-texture Y_VU12 lookup to a RGBA32 value.
Definition: GLESProgramManager.h:142
static const char * programFragmentShaderTwoSidedColor_
Fragment shader code: PT_MATERIAL.
Definition: GLESProgramManager.h:202
static const char * partFunctionLighting_
The code part defining the function to determine the light for a vertex based on up to 8 lights.
Definition: GLESProgramManager.h:154
static const char * partOneTextureLookupYVU24ToRGBA32_
The code part containing the macro to convert the 1-texture YUV24 lookup to a RGBA32 value.
Definition: GLESProgramManager.h:136
static const char * programVertexShaderTexture_
Vertex shader code: PT_TEXTURE_LOWER/UPPLER_LEFT | PT_TEXTURE_BGRA/RGBA.
Definition: GLESProgramManager.h:181
static const char * programFragmentShaderColorId_
Fragment shader code for color ids.
Definition: GLESProgramManager.h:205
static const char * programVertexShaderDebugGray_
Vertex shader code: PT_DEBUG_GRAY.
Definition: GLESProgramManager.h:172
static const char * partOneTextureLookupBGRA32ToRGBA32_
The code part containing the macro to convert a 1-texture BGRA32 lookup to a RGBA32 value.
Definition: GLESProgramManager.h:130
static const char * programVertexShaderMaterialLight_
Vertex shader code: PT_MATERIAL | PT_LIGHT.
Definition: GLESProgramManager.h:178
Lock lock_
Lock for the program manager.
Definition: GLESProgramManager.h:111
static const char * programFragmentShaderOneTexture_
Fragment shader code for one texture.
Definition: GLESProgramManager.h:208
GLESProgramManager()
Creates an shader manager.
static const char * programVertexShaderStaticColor_
Vertex shader code: PT_STATIC_COLOR.
Definition: GLESProgramManager.h:157
static const char * partOneTextureLookupYUV24ToRGBA32_
The code part containing the macro to convert the 1-texture YUV24 lookup to a RGBA32 value.
Definition: GLESProgramManager.h:133
static const char * programVertexShaderMaterial_
Vertex shader code: PT_MATERIAL.
Definition: GLESProgramManager.h:175
ShaderMap vertexShaders_
Map mapping vertex shader codes to compiled shader objects.
Definition: GLESProgramManager.h:102
static const char * programVertexShaderPointsMaterialLight_
Vertex shader code: PT_POINTS | PT_MATERIAL | PT_LIGHT.
Definition: GLESProgramManager.h:169
bool debugReleased_
State determining whether this manager has been released.
Definition: GLESProgramManager.h:116
static const char * programVertexShaderOpaqueTextMaterialLight_
Vertex shader code: PT_OPAQUE_TEXT_Y | PT_MATERIAL | PT_LIGHT.
Definition: GLESProgramManager.h:190
ShaderCodes vertexShaderCodes(const GLESAttribute::ProgramType programType) const
Returns the vertex shader code with a specified functionality.
static const char * programFragmentShaderOneSidedColor_
Fragment shader code: PT_DEBUG_GRAY.
Definition: GLESProgramManager.h:199
static const char * programVertexShaderPointsMaterial_
Vertex shader code: PT_POINTS | PT_MATERIAL.
Definition: GLESProgramManager.h:166
static const char * programFragmentShaderPhantomVideoFastTwoTextures_
Fragment shader code: PT_PHANTOM_VIDEO_FAST | PT_TEXTURE_LOWER/UPPER_LEFT.
Definition: GLESProgramManager.h:220
static const char * partTwoTexturesLookupY_UV12ToRGBA32_
The code part containing the macro to convert the 2-texture Y_UV12 lookup to a RGBA32 value.
Definition: GLESProgramManager.h:139
static const char * programFragmentShaderTransparentTextY_
Fragment shader code: PT_TRANSPARENT_TEXT_Y.
Definition: GLESProgramManager.h:226
std::unordered_map< GLESAttribute::ProgramType, GLESShaderProgramRef > ProgramMap
Definition of an unordered map mapping program types to program objects.
Definition: GLESProgramManager.h:55
static const char * programFragmentShaderOpaqueTextY_
Fragment shader code: PT_OPAQUE_TEXT_Y.
Definition: GLESProgramManager.h:223
std::vector< const char * > ShaderCodes
Definition of a vector holding pointers to shader codes.
Definition: GLESProgramManager.h:45
static const char * programVertexShaderPoints_
Vertex shader code: PT_POINTS.
Definition: GLESProgramManager.h:163
static const char * programVertexShaderTransparentTextMaterialLight_
Vertex shader code: PT_TRANSPARENT_TEXT_Y | PT_MATERIAL | PT_LIGHT.
Definition: GLESProgramManager.h:193
~GLESProgramManager()
Destructs a shader manager.
ProgramMap programMap_
Map mapping program types to shader program objects.
Definition: GLESProgramManager.h:108
static const char * partTwoTexturesLookupY_U_V12ToRGBA32_
The code part containing the macro to convert the 2-texture Y_U_V12 lookup to a RGBA32 value.
Definition: GLESProgramManager.h:145
static const char * partOneTextureLookupY8ToRGBA32_
The code part containing the macro to convert a 1-texture Y8 lookup to a RGBA32 value.
Definition: GLESProgramManager.h:124
static const char * partDefinitionLight_
The code part defining the Light struct.
Definition: GLESProgramManager.h:151
ShaderCodes fragmentShaderCodes(const GLESAttribute::ProgramType programType) const
Returns the fragment shader code with a specified functionality.
static const char * programVertexShaderPhantomVideoTextureCoordinatesFast_
Vertex shader code: PT_PHANTOM_VIDEO_TEXTURE_COORDINATES_FAST:
Definition: GLESProgramManager.h:187
ShaderMap fragmentShaders_
Map mapping fragment shader codes to compiled shader objects.
Definition: GLESProgramManager.h:105
static const char * programFragmentShaderPhantomVideoFastOneTexture_
Fragment shader code: PT_PHANTOM_VIDEO_FAST | PT_TEXTURE_LOWER/UPPER_LEFT.
Definition: GLESProgramManager.h:217
This template class is the base class for all singleton objects.
Definition: Singleton.h:71
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15