DDNet documentation
Loading...
Searching...
No Matches
CGLSLCompiler Class Reference

#include <glsl_shader_compiler.h>

Collaboration diagram for CGLSLCompiler:
[legend]

Classes

class  CDefine

Public Types

enum class  EShaderType { VERTEX , FRAGMENT }
enum class  ETextureReplaceType { TEXTURE_2D , TEXTURE_3D , TEXTURE_2D_ARRAY }

Public Member Functions

 CGLSLCompiler (int OpenGLVersionMajor, int OpenGLVersionMinor, int OpenGLVersionPatch, bool IsOpenGLES, float TextureLODBias)
void SetHasTextureArray (bool TextureArray)
void SetTextureReplaceType (ETextureReplaceType TextureReplaceType)
void AddDefine (const char *pDefineName, const char *pDefineValue)
void ClearDefines ()
void ParseLine (std::string &Line, const char *pReadLine, EShaderType Type) const

Private Member Functions

void ParseLineOldOpenGL (std::string &Line, const char *pReadLine, EShaderType Type) const
void ParseLineGLES (std::string &Line, const char *pReadLine) const

Private Attributes

std::vector< CDefine > m_vDefines
int m_OpenGLVersionMajor
int m_OpenGLVersionMinor
int m_OpenGLVersionPatch
bool m_IsOpenGLES
float m_TextureLODBias
bool m_HasTextureArray
ETextureReplaceType m_TextureReplaceType

Friends

class CGLSL

Member Enumeration Documentation

◆ EShaderType

enum class CGLSLCompiler::EShaderType
strong
Enumerator
VERTEX 
FRAGMENT 

◆ ETextureReplaceType

Enumerator
TEXTURE_2D 
TEXTURE_3D 
TEXTURE_2D_ARRAY 

Constructor & Destructor Documentation

◆ CGLSLCompiler()

CGLSLCompiler::CGLSLCompiler ( int OpenGLVersionMajor,
int OpenGLVersionMinor,
int OpenGLVersionPatch,
bool IsOpenGLES,
float TextureLODBias )

Member Function Documentation

◆ AddDefine()

void CGLSLCompiler::AddDefine ( const char * pDefineName,
const char * pDefineValue )

◆ ClearDefines()

void CGLSLCompiler::ClearDefines ( )

◆ ParseLine()

void CGLSLCompiler::ParseLine ( std::string & Line,
const char * pReadLine,
EShaderType Type ) const

◆ ParseLineGLES()

void CGLSLCompiler::ParseLineGLES ( std::string & Line,
const char * pReadLine ) const
private

◆ ParseLineOldOpenGL()

void CGLSLCompiler::ParseLineOldOpenGL ( std::string & Line,
const char * pReadLine,
EShaderType Type ) const
private

◆ SetHasTextureArray()

void CGLSLCompiler::SetHasTextureArray ( bool TextureArray)
inline

◆ SetTextureReplaceType()

void CGLSLCompiler::SetTextureReplaceType ( ETextureReplaceType TextureReplaceType)
inline

◆ CGLSL

friend class CGLSL
friend

Member Data Documentation

◆ m_HasTextureArray

bool CGLSLCompiler::m_HasTextureArray
private

◆ m_IsOpenGLES

bool CGLSLCompiler::m_IsOpenGLES
private

◆ m_OpenGLVersionMajor

int CGLSLCompiler::m_OpenGLVersionMajor
private

◆ m_OpenGLVersionMinor

int CGLSLCompiler::m_OpenGLVersionMinor
private

◆ m_OpenGLVersionPatch

int CGLSLCompiler::m_OpenGLVersionPatch
private

◆ m_TextureLODBias

float CGLSLCompiler::m_TextureLODBias
private

◆ m_TextureReplaceType

ETextureReplaceType CGLSLCompiler::m_TextureReplaceType
private

◆ m_vDefines

std::vector<CDefine> CGLSLCompiler::m_vDefines
private

The documentation for this class was generated from the following files: