BBMOD_Shader

constructor

new BBMOD_Shader(_shader, _vertexFormat)

Description

Base class for wrappers of raw GameMaker shader resources.

Arguments

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

Properties

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

Methods

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 Sets a texture sampler to the given texture.
set_uniform_f Sets a float uniform.
set_uniform_f2 Sets a vec2 uniform.
set_uniform_f3 Sets a vec3 uniform.
set_uniform_f4 Sets a vec4 uniform.
set_uniform_f_array Sets a float[] uniform.
set_uniform_i Sets an int uniform.
set_uniform_i2 Sets an ivec2 uniform.
set_uniform_i3 Sets an ivec3 uniform.
set_uniform_i4 Sets an ivec4 uniform.
set_uniform_i_array Sets an int[] uniform.
set_uniform_matrix Sets a shader uniform to the current transform matrix.
set_uniform_matrix_array Sets a shader uniform to hold an array of matrix values.

See also

BBMOD_VertexFormat

Do you find this page helpful?

Copyright © 2022, BlueBurn. Built on April 11, 2022 using GMDoc.