Skip to content
Noah Gallo edited this page Mar 12, 2023 · 2 revisions

Shader

The shader class manages a GLSL Shader Program on the GPU. Use CreateShader to compile your own shaders.

Public Static Methods

Signature Return Type Description
CreateShader(string vertexShaderFilePath, string fragmentShaderFilePath) Shader* Creates a new shader program with the given vertex and fragment shaders

Public Methods

Signature Return Type Description
SetBool(const string& name, bool value) void Set's the value of a uniform bool with the given name
SetInt(const string& name, int value) void Set's the value of a uniform int with the given name
SetFloat(const string& name, float value) void Set's the value of a uniform float with the given name
SetVec3(const string& name, vec3 value) void Set's the value of a uniform vec3 with the given name
SetVec4(const string& name, vec4 value) void Set's the value of a uniform vec4 with the given name
SetMat4(const string& name, mat4 value) void Set's the value of a uniform mat4 with the given name
Use() void Tells OpenGL to use this shader when rendering the next object

Clone this wiki locally