Back to class index
Shader[Class Summary]
type
filename
shaderHandle
shaderVariables
ctor
~dtor
LoadFromFile(...) (+2 overloads)
LoadFromString(...)
Deinit()
Name()[const]
ReflectShaderCode(shaderData)
FromFile(...)[static] (+2 overloads)
FromString(...)[static]

Shader::FromFile

Syntax

Shader * Shader::FromFile(ShaderType type, const String &filename, const char *entryPoint=0, const char *profile=0);
Shader * Shader::FromFile(ShaderType type, const char *filename, const char *entryPoint=0, const char *profile=0); [12 lines of code]
Shader * Shader::FromFile(ShaderType type, File &file, const char *entryPoint=0, const char *profile=0); [14 lines of code]

Loads a shader from a text file.

On D3D11, the filename should point to a file with HLSL shader code, and on OpenGL, to a file with GLSL shader code.

Leave a Comment

Name:
Comments:
Captcha:captcha image Type in the black symbols:
Back to class index