DDraceNetwork Docs
glsl_shader_compiler.h
Go to the documentation of this file.
1#ifndef ENGINE_CLIENT_BACKEND_GLSL_SHADER_COMPILER_H
2#define ENGINE_CLIENT_BACKEND_GLSL_SHADER_COMPILER_H
3
4#include <string>
5#include <vector>
6
8{
11};
12
14{
15private:
16 friend class CGLSL;
17
19 {
20 SGLSLCompilerDefine(const std::string &DefineName, const std::string &DefineValue)
21 {
22 m_DefineName = DefineName;
23 m_DefineValue = DefineValue;
24 }
25 std::string m_DefineName;
26 std::string m_DefineValue;
27 };
28
29 std::vector<SGLSLCompilerDefine> m_vDefines;
30
34
36
38
40 int m_TextureReplaceType; // @see EGLSLCompilerTextureReplaceType
41public:
42 CGLSLCompiler(int OpenGLVersionMajor, int OpenGLVersionMinor, int OpenGLVersionPatch, bool IsOpenGLES, float TextureLODBias);
43 void SetHasTextureArray(bool TextureArray) { m_HasTextureArray = TextureArray; }
44 void SetTextureReplaceType(int TextureReplaceType) { m_TextureReplaceType = TextureReplaceType; }
45
46 void AddDefine(const std::string &DefineName, const std::string &DefineValue);
47 void AddDefine(const char *pDefineName, const char *pDefineValue);
48 void ClearDefines();
49
50 void ParseLine(std::string &Line, const char *pReadLine, EGLSLShaderCompilerType Type);
51
53 {
57 };
58};
59
60#endif
Definition: glsl_shader_compiler.h:14
void SetTextureReplaceType(int TextureReplaceType)
Definition: glsl_shader_compiler.h:44
bool m_IsOpenGLES
Definition: glsl_shader_compiler.h:35
float m_TextureLODBias
Definition: glsl_shader_compiler.h:37
int m_OpenGLVersionMajor
Definition: glsl_shader_compiler.h:31
int m_OpenGLVersionPatch
Definition: glsl_shader_compiler.h:33
bool m_HasTextureArray
Definition: glsl_shader_compiler.h:39
void ClearDefines()
Definition: glsl_shader_compiler.cpp:30
std::vector< SGLSLCompilerDefine > m_vDefines
Definition: glsl_shader_compiler.h:29
void AddDefine(const std::string &DefineName, const std::string &DefineValue)
Definition: glsl_shader_compiler.cpp:20
EGLSLCompilerTextureReplaceType
Definition: glsl_shader_compiler.h:53
@ GLSL_COMPILER_TEXTURE_REPLACE_TYPE_2D_ARRAY
Definition: glsl_shader_compiler.h:56
@ GLSL_COMPILER_TEXTURE_REPLACE_TYPE_2D
Definition: glsl_shader_compiler.h:54
@ GLSL_COMPILER_TEXTURE_REPLACE_TYPE_3D
Definition: glsl_shader_compiler.h:55
int m_OpenGLVersionMinor
Definition: glsl_shader_compiler.h:32
CGLSLCompiler(int OpenGLVersionMajor, int OpenGLVersionMinor, int OpenGLVersionPatch, bool IsOpenGLES, float TextureLODBias)
Definition: glsl_shader_compiler.cpp:6
int m_TextureReplaceType
Definition: glsl_shader_compiler.h:40
void SetHasTextureArray(bool TextureArray)
Definition: glsl_shader_compiler.h:43
void ParseLine(std::string &Line, const char *pReadLine, EGLSLShaderCompilerType Type)
Definition: glsl_shader_compiler.cpp:35
Definition: opengl_sl.h:18
EGLSLShaderCompilerType
Definition: glsl_shader_compiler.h:8
@ GLSL_SHADER_COMPILER_TYPE_FRAGMENT
Definition: glsl_shader_compiler.h:10
@ GLSL_SHADER_COMPILER_TYPE_VERTEX
Definition: glsl_shader_compiler.h:9
Definition: glsl_shader_compiler.h:19
std::string m_DefineValue
Definition: glsl_shader_compiler.h:26
SGLSLCompilerDefine(const std::string &DefineName, const std::string &DefineValue)
Definition: glsl_shader_compiler.h:20
std::string m_DefineName
Definition: glsl_shader_compiler.h:25