|
mousetrap v0.2.0
|
bundles a shape in a render task that can be invoked more conveniently during the render cycle More...
#include <render_task.hpp>
Public Member Functions | |
| RenderTask (const Shape &shape, const Shader *shader=nullptr, const GLTransform &transform=GLTransform(), BlendMode blend_mode=BlendMode::NORMAL) | |
| construct the render task | |
| RenderTask (detail::RenderTaskInternal *) | |
| create from gobject \for_internal_use_only | |
| ~RenderTask () | |
| destructor | |
| void | set_uniform_float (const std::string &uniform_name, float value) |
| register a float that will be handed to a shader uniform of the given name during render | |
| void | set_uniform_int (const std::string &uniform_name, int value) |
| register an int that will be handed to a shader uniform of the given name during render | |
| void | set_uniform_uint (const std::string &uniform_name, glm::uint value) |
| register an unsigned integer that will be handed to a shader uniform of the given name during render | |
| void | set_uniform_vec2 (const std::string &uniform_name, Vector2f value) |
| register a Vector2f that will be handed to a shader uniform of the given name during render | |
| void | set_uniform_vec3 (const std::string &uniform_name, Vector3f value) |
| register a Vector3f that will be handed to a shader uniform of the given name during render | |
| void | set_uniform_vec4 (const std::string &uniform_name, Vector4f value) |
| register a Vector4f that will be handed to a shader uniform of the given name during render | |
| void | set_uniform_transform (const std::string &uniform_name, GLTransform value) |
| register a transform that will be handed to a shader uniform of the given name during render | |
| void | set_uniform_rgba (const std::string &uniform_name, RGBA value) |
| register a color as RGBA that will be handed to a shader uniform of the given name during render | |
| void | set_uniform_hsva (const std::string &uniform_name, HSVA value) |
| register a color as HSVA that will be handed to a shader uniform of the given name during render | |
| float | get_uniform_float (const std::string &uniform_name) const |
| access currently registered float | |
| int32_t | get_uniform_int (const std::string &uniform_name) const |
| access currently registered int | |
| uint32_t | get_uniform_uint (const std::string &uniform_name) const |
| access currently registered uint | |
| Vector2f | get_uniform_vec2 (const std::string &uniform_name) const |
| access currently registered vec2 | |
| Vector3f | get_uniform_vec3 (const std::string &uniform_name) const |
| access currently registered vec3 | |
| Vector4f | get_uniform_vec4 (const std::string &uniform_name) const |
| access currently registered vec4 | |
| GLTransform | get_uniform_transform (const std::string &uniform_name) const |
| access currently registered transform (mat4x4) | |
| RGBA | get_uniform_rgba (const std::string &uniform_name) const |
| access currently registered color (vec4) | |
| HSVA | get_uniform_hsva (const std::string &uniform_name) const |
| access currently registered color (vec4) | |
| void | render () const |
| perform the render step to the currently bound framebuffer | |
| operator GObject * () const override | |
| expose as GObject \for_internal_use_only | |
Public Member Functions inherited from mousetrap::SignalEmitter | |
| void | set_signal_blocked (const std::string &signal_id, bool b) |
| block a signal by id \for_internal_use_only | |
| bool | get_signal_blocked (const std::string &signal_id) const |
| get whether a signal is currently blocked | |
| std::vector< std::string > | get_all_signal_names () |
| get list of possible signal ids \for_internal_use_only | |
| template<typename Function_t > | |
| void | connect_signal (const std::string &signal_id, Function_t *function, void *data=nullptr) |
| connect static function to signal, does not work with lambdas \for_internal_use_only | |
| void | disconnect_signal (const std::string &signal_id) |
| disconnect signal, it may not be invoked until reconnected, if signal is not registered, does nothing. For internal use only | |
| virtual | operator NativeObject () const =0 |
| expose as NativeObject, this is the GLib instance that signals are emitted on \for_internal_use_only | |
| virtual NativeObject | get_internal () const |
| expose internally managed object, \for_internal_use_only | |
Additional Inherited Members | |
Protected Member Functions inherited from mousetrap::SignalEmitter | |
| SignalEmitter () | |
| ctor | |
| ~SignalEmitter () | |
| destructor | |
bundles a shape in a render task that can be invoked more conveniently during the render cycle
|
explicit |
construct the render task
| shape | shape to render |
| shader | shader to apply to the shape when rendering, if nullptr, the default shader is used |
| transform | transform to hand to the vertex shader when rendering, if nullptr, the identity transform will be handed isntead |
| blend_mode | blend_mode to set before rendering the shape, normal alpha-blending if unspecified |
| float mousetrap::RenderTask::get_uniform_float | ( | const std::string & | uniform_name | ) | const |
access currently registered float
| uniform_name |
References mousetrap::log::critical().
| HSVA mousetrap::RenderTask::get_uniform_hsva | ( | const std::string & | uniform_name | ) | const |
access currently registered color (vec4)
| uniform_name |
References mousetrap::log::critical().
| glm::int32_t mousetrap::RenderTask::get_uniform_int | ( | const std::string & | uniform_name | ) | const |
access currently registered int
| uniform_name |
References mousetrap::log::critical().
| RGBA mousetrap::RenderTask::get_uniform_rgba | ( | const std::string & | uniform_name | ) | const |
access currently registered color (vec4)
| uniform_name |
References mousetrap::log::critical().
| GLTransform mousetrap::RenderTask::get_uniform_transform | ( | const std::string & | uniform_name | ) | const |
access currently registered transform (mat4x4)
| uniform_name |
References mousetrap::log::critical().
| glm::uint mousetrap::RenderTask::get_uniform_uint | ( | const std::string & | uniform_name | ) | const |
access currently registered uint
| uniform_name |
References mousetrap::log::critical().
| Vector2f mousetrap::RenderTask::get_uniform_vec2 | ( | const std::string & | uniform_name | ) | const |
access currently registered vec2
| uniform_name |
References mousetrap::log::critical().
| Vector3f mousetrap::RenderTask::get_uniform_vec3 | ( | const std::string & | uniform_name | ) | const |
access currently registered vec3
| uniform_name |
References mousetrap::log::critical().
| Vector4f mousetrap::RenderTask::get_uniform_vec4 | ( | const std::string & | uniform_name | ) | const |
access currently registered vec4
| uniform_name |
References mousetrap::log::critical().
| void mousetrap::RenderTask::set_uniform_float | ( | const std::string & | uniform_name, |
| float | value | ||
| ) |
register a float that will be handed to a shader uniform of the given name during render
| uniform_name | name of the uniform variable in the glsl shader code, has to be of type float |
| pointer | pointer to value, the user is responsible for keeping it in scope |
| value |
| void mousetrap::RenderTask::set_uniform_hsva | ( | const std::string & | uniform_name, |
| HSVA | value | ||
| ) |
register a color as HSVA that will be handed to a shader uniform of the given name during render
| uniform_name | name of the uniform variable in the glsl shader code, has to be of type vec4 |
| value |
References set_uniform_vec4().
| void mousetrap::RenderTask::set_uniform_int | ( | const std::string & | uniform_name, |
| int | value | ||
| ) |
register an int that will be handed to a shader uniform of the given name during render
| uniform_name | name of the uniform variable in the glsl shader code, has to be of type int |
| value |
| void mousetrap::RenderTask::set_uniform_rgba | ( | const std::string & | uniform_name, |
| RGBA | value | ||
| ) |
register a color as RGBA that will be handed to a shader uniform of the given name during render
| uniform_name | name of the uniform variable in the glsl shader code, has to be of type vec4 |
| value |
References set_uniform_vec4().
| void mousetrap::RenderTask::set_uniform_transform | ( | const std::string & | uniform_name, |
| GLTransform | value | ||
| ) |
register a transform that will be handed to a shader uniform of the given name during render
| uniform_name | name of the uniform variable in the glsl shader code, has to be of type mat4x4 |
| value |
| void mousetrap::RenderTask::set_uniform_uint | ( | const std::string & | uniform_name, |
| glm::uint | value | ||
| ) |
register an unsigned integer that will be handed to a shader uniform of the given name during render
| uniform_name | name of the uniform variable in the glsl shader code, has to be of type uint |
| value |
| void mousetrap::RenderTask::set_uniform_vec2 | ( | const std::string & | uniform_name, |
| Vector2f | value | ||
| ) |
register a Vector2f that will be handed to a shader uniform of the given name during render
| uniform_name | name of the uniform variable in the glsl shader code, has to be of type vec2 |
| value |
| void mousetrap::RenderTask::set_uniform_vec3 | ( | const std::string & | uniform_name, |
| Vector3f | value | ||
| ) |
register a Vector3f that will be handed to a shader uniform of the given name during render
| uniform_name | name of the uniform variable in the glsl shader code, has to be of type vec3 |
| value |
| void mousetrap::RenderTask::set_uniform_vec4 | ( | const std::string & | uniform_name, |
| Vector4f | value | ||
| ) |
register a Vector4f that will be handed to a shader uniform of the given name during render
| uniform_name | name of the uniform variable in the glsl shader code, has to be of type vec4 |
| value |
Referenced by set_uniform_hsva(), and set_uniform_rgba().