new BBMOD_Shader(_shader, _vertexFormat)


Base class for wrappers of raw GameMaker shader resources.


Name Type Description
_shader Asset.GMShader The shader resource.
_vertexFormat Struct.BBMOD_VertexFormat The vertex format required by the shader.


Name Description
Raw The shader resource.
VertexFormat The vertex format required by the shader.


Name Description
get_name Retrieves the name of the shader.
get_sampler_index Retrieves an index of a texture sampler.
get_uniform Retrieves a handle of a shader uniform.
is_compiled Checks whether the shader is compiled.
is_current Checks if the shader is currently in use.
on_reset A function executed when the shader is reset.
on_set A function executed when the shader is set.
reset Unsets the shaders.
set Sets the shader as the current shader.
set_material Sets shader uniforms using values from the material.
set_sampler DEPRECATED Sets a texture sampler to the given texture.
set_uniform_f DEPRECATED Sets a float uniform.
set_uniform_f2 DEPRECATED Sets a vec2 uniform.
set_uniform_f3 DEPRECATED Sets a vec3 uniform.
set_uniform_f4 DEPRECATED Sets a vec4 uniform.
set_uniform_f_array DEPRECATED Sets a float[] uniform.
set_uniform_i DEPRECATED Sets an int uniform.
set_uniform_i2 DEPRECATED Sets an ivec2 uniform.
set_uniform_i3 DEPRECATED Sets an ivec3 uniform.
set_uniform_i4 DEPRECATED Sets an ivec4 uniform.
set_uniform_i_array DEPRECATED Sets an int[] uniform.
set_uniform_matrix DEPRECATED Sets a shader uniform to the current transform matrix.
set_uniform_matrix_array DEPRECATED Sets a shader uniform to hold an array of matrix values.

See also


Do you find this page helpful?

Copyright © 2022, BlueBurn. Built on November 16, 2022 using GMDoc.