cubos::core::gl::impl::ShaderBindingPoint class

Abstract shader binding point.

Public functions

void bind(gl::Sampler sampler) pure virtual
Binds a sampler to the binding point.
void bind(gl::Texture1D tex) pure virtual
Binds a 1D texture to the binding point.
void bind(gl::Texture2D tex) pure virtual
Binds a 2D texture to the binding point.
void bind(gl::Texture2DArray tex) pure virtual
Binds a 2D texture array to the binding point.
void bind(gl::Texture3D tex) pure virtual
Binds a 3D texture to the binding point.
void bind(gl::CubeMap cubeMap) pure virtual
Binds a cube map to the binding point.
void bind(gl::CubeMapArray cubeMap) pure virtual
Binds a cube map array to the binding point.
void bind(gl::ConstantBuffer cb) pure virtual
Binds a constant buffer to the binding point.
void bind(gl::Texture2D tex, int level, Access access) pure virtual
Binds a level of a 2D texture to an image unit.
void setConstant(glm::vec2 val) pure virtual
Sets the value of the uniform tied to the binding point to the provided vec2 value.
void setConstant(glm::vec3 val) pure virtual
Sets the value of the uniform tied to the binding point to the provided vec3 value.
void setConstant(glm::vec4 val) pure virtual
Sets the value of the uniform tied to the binding point to the provided vec4 value.
void setConstant(glm::ivec2 val) pure virtual
Sets the value of the uniform tied to the binding point to the provided integer vec2 value.
void setConstant(glm::ivec3 val) pure virtual
Sets the value of the uniform tied to the binding point to the provided integer vec3 value.
void setConstant(glm::ivec4 val) pure virtual
Sets the value of the uniform tied to the binding point to the provided integer vec4 value.
void setConstant(glm::uvec2 val) pure virtual
Sets the value of the uniform tied to the binding point to the provided unsigned integer vec2 value.
void setConstant(glm::uvec3 val) pure virtual
Sets the value of the uniform tied to the binding point to the provided unsigned integer vec3 value.
void setConstant(glm::uvec4 val) pure virtual
Sets the value of the uniform tied to the binding point to the provided unsigned integer vec4 value.
void setConstant(glm::mat4 val) pure virtual
Sets the value of the uniform tied to the binding point to the provided mat4 value.
void setConstant(float val) pure virtual
Sets the value of the uniform tied to the binding point to the provided float value.
void setConstant(int val) pure virtual
Sets the value of the uniform tied to the binding point to the provided int value.
void setConstant(unsigned int val) pure virtual
Sets the value of the uniform tied to the binding point to the provided unsigned int value.
auto queryConstantBufferStructure(ConstantBufferStructure* structure) -> bool pure virtual
Gets the constant buffer structure of this binding point.

Function documentation

void cubos::core::gl::impl::ShaderBindingPoint::bind(gl::Sampler sampler) pure virtual

Binds a sampler to the binding point.

Parameters
sampler Sampler to bind.

If this binding point doesn't support a sampler, an error is logged.

void cubos::core::gl::impl::ShaderBindingPoint::bind(gl::Texture1D tex) pure virtual

Binds a 1D texture to the binding point.

Parameters
tex Texture to bind.

If this binding point doesn't support a 1D texture, an error is logged.

void cubos::core::gl::impl::ShaderBindingPoint::bind(gl::Texture2D tex) pure virtual

Binds a 2D texture to the binding point.

Parameters
tex Texture to bind.

If this binding point doesn't support a 2D texture, an error is logged.

void cubos::core::gl::impl::ShaderBindingPoint::bind(gl::Texture2DArray tex) pure virtual

Binds a 2D texture array to the binding point.

Parameters
tex Texture array to bind.

If this binding point doesn't support a 2D texture array, an error is logged.

void cubos::core::gl::impl::ShaderBindingPoint::bind(gl::Texture3D tex) pure virtual

Binds a 3D texture to the binding point.

Parameters
tex Texture to bind.

If this binding point doesn't support a 3D texture, an error is logged.

void cubos::core::gl::impl::ShaderBindingPoint::bind(gl::CubeMap cubeMap) pure virtual

Binds a cube map to the binding point.

Parameters
cubeMap Cube map to bind.

If this binding point doesn't support a cube map, an error is logged.

void cubos::core::gl::impl::ShaderBindingPoint::bind(gl::CubeMapArray cubeMap) pure virtual

Binds a cube map array to the binding point.

Parameters
cubeMap Cube map to bind.

If this binding point doesn't support a cube map array, an error is logged.

void cubos::core::gl::impl::ShaderBindingPoint::bind(gl::ConstantBuffer cb) pure virtual

Binds a constant buffer to the binding point.

Parameters
cb Constant buffer to bind.

If this binding point doesn't support a constant buffer, an error is logged.

void cubos::core::gl::impl::ShaderBindingPoint::bind(gl::Texture2D tex, int level, Access access) pure virtual

Binds a level of a 2D texture to an image unit.

Parameters
tex Texture to bind.
level Mip level to bind.
access Access mode.

If this binding point doesn't support an image unit, an error is logged.

void cubos::core::gl::impl::ShaderBindingPoint::setConstant(glm::vec2 val) pure virtual

Sets the value of the uniform tied to the binding point to the provided vec2 value.

Parameters
val Value to set.

void cubos::core::gl::impl::ShaderBindingPoint::setConstant(glm::vec3 val) pure virtual

Sets the value of the uniform tied to the binding point to the provided vec3 value.

Parameters
val Value to set.

void cubos::core::gl::impl::ShaderBindingPoint::setConstant(glm::vec4 val) pure virtual

Sets the value of the uniform tied to the binding point to the provided vec4 value.

Parameters
val Value to set.

void cubos::core::gl::impl::ShaderBindingPoint::setConstant(glm::ivec2 val) pure virtual

Sets the value of the uniform tied to the binding point to the provided integer vec2 value.

Parameters
val Value to set.

void cubos::core::gl::impl::ShaderBindingPoint::setConstant(glm::ivec3 val) pure virtual

Sets the value of the uniform tied to the binding point to the provided integer vec3 value.

Parameters
val Value to set.

void cubos::core::gl::impl::ShaderBindingPoint::setConstant(glm::ivec4 val) pure virtual

Sets the value of the uniform tied to the binding point to the provided integer vec4 value.

Parameters
val Value to set.

void cubos::core::gl::impl::ShaderBindingPoint::setConstant(glm::uvec2 val) pure virtual

Sets the value of the uniform tied to the binding point to the provided unsigned integer vec2 value.

Parameters
val Value to set.

void cubos::core::gl::impl::ShaderBindingPoint::setConstant(glm::uvec3 val) pure virtual

Sets the value of the uniform tied to the binding point to the provided unsigned integer vec3 value.

Parameters
val Value to set.

void cubos::core::gl::impl::ShaderBindingPoint::setConstant(glm::uvec4 val) pure virtual

Sets the value of the uniform tied to the binding point to the provided unsigned integer vec4 value.

Parameters
val Value to set.

void cubos::core::gl::impl::ShaderBindingPoint::setConstant(glm::mat4 val) pure virtual

Sets the value of the uniform tied to the binding point to the provided mat4 value.

Parameters
val Value to set.

void cubos::core::gl::impl::ShaderBindingPoint::setConstant(float val) pure virtual

Sets the value of the uniform tied to the binding point to the provided float value.

Parameters
val Value to set.

void cubos::core::gl::impl::ShaderBindingPoint::setConstant(int val) pure virtual

Sets the value of the uniform tied to the binding point to the provided int value.

Parameters
val Value to set.

void cubos::core::gl::impl::ShaderBindingPoint::setConstant(unsigned int val) pure virtual

Sets the value of the uniform tied to the binding point to the provided unsigned int value.

Parameters
val Value to set.

bool cubos::core::gl::impl::ShaderBindingPoint::queryConstantBufferStructure(ConstantBufferStructure* structure) pure virtual

Gets the constant buffer structure of this binding point.

Returns Whether the query was successful.

If this binding point doesn't support a constant buffer, an error is logged.