zenilib
0.5.3.0
|
Go to the source code of this file.
Classes | |
struct | ShBuiltInResources |
Macros | |
#define | ANGLE_SH_VERSION 110 |
#define | COMPILER_EXPORT |
Typedefs | |
typedef void * | ShHandle |
typedef khronos_uint64_t(* | ShHashFunction64 )(const char *, size_t) |
#define ANGLE_SH_VERSION 110 |
Definition at line 40 of file ShaderLang.h.
#define COMPILER_EXPORT |
Definition at line 23 of file ShaderLang.h.
Definition at line 255 of file ShaderLang.h.
typedef khronos_uint64_t(* ShHashFunction64)(const char *, size_t) |
Definition at line 197 of file ShaderLang.h.
Enumerator | |
---|---|
SH_CLAMP_WITH_CLAMP_INTRINSIC | |
SH_CLAMP_WITH_USER_DEFINED_INT_CLAMP_FUNCTION |
Definition at line 175 of file ShaderLang.h.
enum ShCompileOptions |
Definition at line 126 of file ShaderLang.h.
enum ShDataType |
Definition at line 88 of file ShaderLang.h.
enum ShShaderInfo |
Definition at line 111 of file ShaderLang.h.
enum ShShaderOutput |
Enumerator | |
---|---|
SH_ESSL_OUTPUT | |
SH_GLSL_OUTPUT | |
SH_HLSL_OUTPUT | |
SH_HLSL9_OUTPUT | |
SH_HLSL11_OUTPUT |
Definition at line 80 of file ShaderLang.h.
enum ShShaderSpec |
Enumerator | |
---|---|
SH_GLES2_SPEC | |
SH_WEBGL_SPEC | |
SH_CSS_SHADERS_SPEC |
Definition at line 53 of file ShaderLang.h.
enum ShShaderType |
Enumerator | |
---|---|
SH_FRAGMENT_SHADER | |
SH_VERTEX_SHADER |
Definition at line 48 of file ShaderLang.h.
COMPILER_EXPORT int ShCompile | ( | const ShHandle | handle, |
const char *const | shaderStrings[], | ||
size_t | numStrings, | ||
int | compileOptions | ||
) |
Definition at line 176 of file ShaderLang.cpp.
References TCompiler::compile(), and TShHandleBase::getAsCompiler().
Referenced by Zeni::Video::compile_glsles_shader(), and CompileFile().
COMPILER_EXPORT ShHandle ShConstructCompiler | ( | ShShaderType | type, |
ShShaderSpec | spec, | ||
ShShaderOutput | output, | ||
const ShBuiltInResources * | resources | ||
) |
Definition at line 140 of file ShaderLang.cpp.
References ConstructCompiler(), TShHandleBase::getAsCompiler(), TCompiler::Init(), and ShDestruct().
Referenced by Zeni::Video_GL_Shader::init(), Zeni::Video_GL_Fixed::init(), Zeni::Video_DX9::init_device(), and main().
COMPILER_EXPORT void ShDestruct | ( | ShHandle | handle | ) |
Definition at line 158 of file ShaderLang.cpp.
References DeleteCompiler(), and TShHandleBase::getAsCompiler().
Referenced by Zeni::Video_DX9::destroy_device(), main(), ShConstructCompiler(), Zeni::Video_GL_Shader::uninit(), and Zeni::Video_GL_Fixed::uninit().
COMPILER_EXPORT int ShFinalize | ( | ) |
Definition at line 100 of file ShaderLang.cpp.
References DetachProcess().
Referenced by main(), and Zeni::Video::Video().
COMPILER_EXPORT void ShGetActiveAttrib | ( | const ShHandle | handle, |
int | index, | ||
size_t * | length, | ||
int * | size, | ||
ShDataType * | type, | ||
char * | name, | ||
char * | mappedName | ||
) |
Definition at line 280 of file ShaderLang.cpp.
References getVariableInfo(), and SH_ACTIVE_ATTRIBUTES.
Referenced by PrintActiveVariables().
COMPILER_EXPORT void ShGetActiveUniform | ( | const ShHandle | handle, |
int | index, | ||
size_t * | length, | ||
int * | size, | ||
ShDataType * | type, | ||
char * | name, | ||
char * | mappedName | ||
) |
Definition at line 292 of file ShaderLang.cpp.
References getVariableInfo(), and SH_ACTIVE_UNIFORMS.
Referenced by PrintActiveVariables().
COMPILER_EXPORT void ShGetInfo | ( | const ShHandle | handle, |
ShShaderInfo | pname, | ||
size_t * | params | ||
) |
Definition at line 194 of file ShaderLang.cpp.
References TShHandleBase::getAsCompiler(), TCompiler::getAttribs(), TCompiler::getHashFunction(), TCompiler::getInfoSink(), TCompiler::getNameMap(), TCompiler::getUniforms(), HASHED_NAME_PREFIX, TInfoSink::info, MAX_SYMBOL_NAME_LEN, NULL, TInfoSink::obj, SH_ACTIVE_ATTRIBUTE_MAX_LENGTH, SH_ACTIVE_ATTRIBUTES, SH_ACTIVE_UNIFORM_MAX_LENGTH, SH_ACTIVE_UNIFORMS, SH_HASHED_NAME_MAX_LENGTH, SH_HASHED_NAMES_COUNT, SH_INFO_LOG_LENGTH, SH_MAPPED_NAME_MAX_LENGTH, SH_NAME_MAX_LENGTH, SH_OBJECT_CODE_LENGTH, TInfoSinkBase::size(), and UNREACHABLE.
Referenced by checkActiveUniformAndAttribMaxLengths(), checkMappedNameMaxLength(), Zeni::Video::compile_glsles_shader(), main(), PrintActiveVariables(), and ShGetNameHashingEntry().
COMPILER_EXPORT void ShGetInfoLog | ( | const ShHandle | handle, |
char * | infoLog | ||
) |
Definition at line 251 of file ShaderLang.cpp.
References TInfoSinkBase::c_str(), TShHandleBase::getAsCompiler(), TCompiler::getInfoSink(), and TInfoSink::info.
Referenced by main().
COMPILER_EXPORT void ShGetInfoPointer | ( | const ShHandle | handle, |
ShShaderInfo | pname, | ||
void ** | params | ||
) |
Definition at line 347 of file ShaderLang.cpp.
References TShHandleBase::getAsTranslatorHLSL(), TranslatorHLSL::getUniforms(), SH_ACTIVE_UNIFORMS_ARRAY, and UNREACHABLE.
COMPILER_EXPORT void ShGetNameHashingEntry | ( | const ShHandle | handle, |
int | index, | ||
char * | name, | ||
char * | hashedName | ||
) |
Definition at line 304 of file ShaderLang.cpp.
References ASSERT, TShHandleBase::getAsCompiler(), TCompiler::getNameMap(), i, SH_HASHED_NAME_MAX_LENGTH, SH_NAME_MAX_LENGTH, and ShGetInfo().
COMPILER_EXPORT void ShGetObjectCode | ( | const ShHandle | handle, |
char * | objCode | ||
) |
Definition at line 267 of file ShaderLang.cpp.
References TInfoSinkBase::c_str(), TShHandleBase::getAsCompiler(), TCompiler::getInfoSink(), and TInfoSink::obj.
Referenced by Zeni::Video::compile_glsles_shader(), and main().
COMPILER_EXPORT void ShInitBuiltInResources | ( | ShBuiltInResources * | resources | ) |
Definition at line 109 of file ShaderLang.cpp.
References ShBuiltInResources::ARB_texture_rectangle, ShBuiltInResources::ArrayIndexClampingStrategy, ShBuiltInResources::EXT_draw_buffers, ShBuiltInResources::EXT_frag_depth, ShBuiltInResources::FragmentPrecisionHigh, ShBuiltInResources::HashFunction, ShBuiltInResources::MaxCombinedTextureImageUnits, ShBuiltInResources::MaxDrawBuffers, ShBuiltInResources::MaxFragmentUniformVectors, ShBuiltInResources::MaxTextureImageUnits, ShBuiltInResources::MaxVaryingVectors, ShBuiltInResources::MaxVertexAttribs, ShBuiltInResources::MaxVertexTextureImageUnits, ShBuiltInResources::MaxVertexUniformVectors, NULL, ShBuiltInResources::OES_EGL_image_external, ShBuiltInResources::OES_standard_derivatives, and SH_CLAMP_WITH_CLAMP_INTRINSIC.
Referenced by GenerateResources(), Zeni::Video_GL_Shader::init(), Zeni::Video_GL_Fixed::init(), and Zeni::Video_DX9::init_device().
COMPILER_EXPORT int ShInitialize | ( | ) |
Definition at line 91 of file ShaderLang.cpp.
References InitProcess().
Referenced by main(), and Zeni::Video::Video().