#include <C4Shader.h>
Public Member Functions | |
C4Shader () | |
~C4Shader () | |
bool | Initialised () const |
GLint | GetUniform (int iUniform) const |
bool | HaveUniform (int iUniform) const |
GLint | GetAttribute (int iAttribute) const |
void | AddDefine (const char *name) |
void | AddVertexSlice (int iPos, const char *szText) |
void | AddFragmentSlice (int iPos, const char *szText) |
void | AddVertexSlices (const char *szWhat, const char *szText, const char *szSource="", int iFileTime=0) |
void | AddFragmentSlices (const char *szWhat, const char *szText, const char *szSource="", int iFileTime=0) |
bool | LoadFragmentSlices (C4GroupSet *pGroupSet, const char *szFile) |
bool | LoadVertexSlices (C4GroupSet *pGroupSet, const char *szFile) |
void | SetScriptCategories (const std::vector< std::string > &categories) |
bool | Init (const char *szWhat, const char **szUniforms, const char **szAttributes) |
bool | Refresh () |
void | ClearSlices () |
void | Clear () |
Static Public Member Functions | |
static bool | IsLogging () |
Friends | |
class | C4ShaderCall |
class | C4ScriptUniform |
Definition at line 61 of file C4Shader.h.
C4Shader::C4Shader | ( | ) |
Definition at line 47 of file C4Shader.cpp.
C4Shader::~C4Shader | ( | ) |
Definition at line 53 of file C4Shader.cpp.
References Clear().
void C4Shader::AddDefine | ( | const char * | name | ) |
Definition at line 65 of file C4Shader.cpp.
References AddFragmentSlice(), AddVertexSlice(), FormatString(), and StdStrBuf::getData().
Referenced by C4DefAdditionalResourcesLoader::AddShaderSlices(), and CStdGL::PrepareSpriteShader().
void C4Shader::AddFragmentSlice | ( | int | iPos, |
const char * | szText | ||
) |
Definition at line 77 of file C4Shader.cpp.
Referenced by AddDefine().
void C4Shader::AddFragmentSlices | ( | const char * | szWhat, |
const char * | szText, | ||
const char * | szSource = "" , |
||
int | iFileTime = 0 |
||
) |
Definition at line 87 of file C4Shader.cpp.
Referenced by C4FoW::GetFramebufShader(), C4FoW::GetRenderShader(), and Refresh().
void C4Shader::AddVertexSlice | ( | int | iPos, |
const char * | szText | ||
) |
Definition at line 72 of file C4Shader.cpp.
Referenced by AddDefine().
void C4Shader::AddVertexSlices | ( | const char * | szWhat, |
const char * | szText, | ||
const char * | szSource = "" , |
||
int | iFileTime = 0 |
||
) |
Definition at line 82 of file C4Shader.cpp.
Referenced by C4FoW::GetFramebufShader(), and C4FoW::GetRenderShader().
void C4Shader::Clear | ( | ) |
Definition at line 335 of file C4Shader.cpp.
Referenced by C4Sky::Clear(), CStdGL::Clear(), CStdGL::PrepareSpriteShader(), and ~C4Shader().
void C4Shader::ClearSlices | ( | ) |
Definition at line 324 of file C4Shader.cpp.
Referenced by C4FoW::GetFramebufShader(), C4FoW::GetRenderShader(), and CStdGL::PrepareSpriteShader().
|
inline |
Definition at line 127 of file C4Shader.h.
Referenced by C4LandscapeRenderGL::Draw(), C4ShaderCall::GetAttribute(), and C4FoWRegion::Render().
|
inline |
Definition at line 117 of file C4Shader.h.
Referenced by HaveUniform(), C4ShaderCall::SetUniform1f(), C4ShaderCall::SetUniform1fv(), C4ShaderCall::SetUniform1i(), C4ShaderCall::SetUniform1iv(), C4ShaderCall::SetUniform1ui(), C4ShaderCall::SetUniform1uiv(), C4ShaderCall::SetUniform2f(), C4ShaderCall::SetUniform2fv(), C4ShaderCall::SetUniform2i(), C4ShaderCall::SetUniform2iv(), C4ShaderCall::Setuniform2ui(), C4ShaderCall::SetUniform2uiv(), C4ShaderCall::SetUniform3f(), C4ShaderCall::SetUniform3fv(), C4ShaderCall::SetUniform3i(), C4ShaderCall::SetUniform3iv(), C4ShaderCall::Setuniform3ui(), C4ShaderCall::SetUniform3uiv(), C4ShaderCall::SetUniform4f(), C4ShaderCall::SetUniform4fv(), C4ShaderCall::SetUniform4i(), C4ShaderCall::SetUniform4iv(), C4ShaderCall::Setuniform4ui(), C4ShaderCall::SetUniform4uiv(), C4ShaderCall::SetUniformMatrix2x3fv(), C4ShaderCall::SetUniformMatrix3x3(), C4ShaderCall::SetUniformMatrix3x3fv(), C4ShaderCall::SetUniformMatrix3x3Transpose(), C4ShaderCall::SetUniformMatrix3x4(), C4ShaderCall::SetUniformMatrix3x4fv(), C4ShaderCall::SetUniformMatrix4x4(), and C4ShaderCall::SetUniformMatrix4x4fv().
|
inline |
Definition at line 122 of file C4Shader.h.
References GetUniform().
Referenced by C4ShaderCall::AllocTexUnit(), C4LandscapeRenderGL::Draw(), C4ShaderCall::SetUniform1f(), C4ShaderCall::SetUniform1fv(), C4ShaderCall::SetUniform1i(), C4ShaderCall::SetUniform1iv(), C4ShaderCall::SetUniform1ui(), C4ShaderCall::SetUniform1uiv(), C4ShaderCall::SetUniform2f(), C4ShaderCall::SetUniform2fv(), C4ShaderCall::SetUniform2i(), C4ShaderCall::SetUniform2iv(), C4ShaderCall::Setuniform2ui(), C4ShaderCall::SetUniform2uiv(), C4ShaderCall::SetUniform3f(), C4ShaderCall::SetUniform3fv(), C4ShaderCall::SetUniform3i(), C4ShaderCall::SetUniform3iv(), C4ShaderCall::Setuniform3ui(), C4ShaderCall::SetUniform3uiv(), C4ShaderCall::SetUniform4f(), C4ShaderCall::SetUniform4fv(), C4ShaderCall::SetUniform4i(), C4ShaderCall::SetUniform4iv(), C4ShaderCall::Setuniform4ui(), C4ShaderCall::SetUniform4uiv(), C4ShaderCall::SetUniformMatrix2x3fv(), C4ShaderCall::SetUniformMatrix3x3(), C4ShaderCall::SetUniformMatrix3x3fv(), C4ShaderCall::SetUniformMatrix3x3Transpose(), C4ShaderCall::SetUniformMatrix3x4(), C4ShaderCall::SetUniformMatrix3x4fv(), C4ShaderCall::SetUniformMatrix4x4(), and C4ShaderCall::SetUniformMatrix4x4fv().
bool C4Shader::Init | ( | const char * | szWhat, |
const char ** | szUniforms, | ||
const char ** | szAttributes | ||
) |
Definition at line 348 of file C4Shader.cpp.
References StdStrBuf::Copy(), FormatString(), StdStrBuf::getData(), IsLogging(), C4TimeMilliseconds::Now(), CStdGL::ObjectLabel(), pGL, ShaderLog(), and ShaderLogF().
Referenced by C4FoW::GetFramebufShader(), C4FoW::GetRenderShader(), and Refresh().
|
inline |
Definition at line 106 of file C4Shader.h.
Referenced by C4LandscapeRenderGL::Draw(), C4FoW::GetFramebufShader(), C4FoW::GetRenderShader(), and StdMeshMaterialProgram::IsCompiled().
|
static |
Definition at line 665 of file C4Shader.cpp.
References Application, Config, C4ConfigGraphics::DebugOpenGL, C4Config::Graphics, and C4Application::isEditor.
Referenced by Init(), and OpenExtraLogs().
bool C4Shader::LoadFragmentSlices | ( | C4GroupSet * | pGroupSet, |
const char * | szFile | ||
) |
Definition at line 92 of file C4Shader.cpp.
bool C4Shader::LoadVertexSlices | ( | C4GroupSet * | pGroupSet, |
const char * | szFile | ||
) |
Definition at line 97 of file C4Shader.cpp.
bool C4Shader::Refresh | ( | ) |
Definition at line 445 of file C4Shader.cpp.
References _MAX_PATH_LEN, AddFragmentSlices(), C4Config::AtRelativePath(), C4Group::Close(), Config, FileExists(), FileTime(), FormatString(), StdStrBuf::getData(), GetFilename(), GetParentPath(), C4ScriptShader::GetShaderIDs(), Init(), C4Group::LoadEntryString(), C4TimeMilliseconds::Now(), C4Group::Open(), ScriptShader, SEqual(), and ShaderLogF().
void C4Shader::SetScriptCategories | ( | const std::vector< std::string > & | categories | ) |
Definition at line 102 of file C4Shader.cpp.
|
friend |
Definition at line 64 of file C4Shader.h.
|
friend |
Definition at line 63 of file C4Shader.h.