Loading...
Searching...
No Matches
Classes |
Public Types |
Public Member Functions |
Public Attributes |
Static Public Attributes |
List of all members
score::gfx::TexgenNode Struct Reference
Inheritance diagram for score::gfx::TexgenNode:
Classes | |
| struct | Rendered |
| struct | ubo |
Public Types | |
| using | func_t = void(*)(unsigned char *rgb, int width, int height, int t) |
Public Member Functions | |
| score::gfx::NodeRenderer * | createRenderer (RenderList &r) const noexcept override |
| Create a renderer in a given context for this node. | |
Public Member Functions inherited from score::gfx::ProcessNode | |
| void | process (Message &&msg) override |
| Process a message from the execution engine. | |
| virtual void | process (Timings tk) |
| virtual void | process (int32_t port, const ossia::value &v) |
| virtual void | process (int32_t port, const ossia::audio_vector &v) |
| virtual void | process (int32_t port, const ossia::transform3d &v) |
| void | process (int32_t port, ossia::monostate) const noexcept |
| virtual void | process (int32_t port, const FunctionMessage &) |
| virtual void | process (int32_t port, const ossia::buffer_spec &) |
| bool | resetEventPortsAfterFrame () noexcept |
| Node () | |
| Node (const Node &)=delete | |
| Node (Node &&)=delete | |
| virtual void | process (Message &&msg) |
| Process a message from the execution engine. | |
| void | process (int32_t port, const ossia::render_target_spec &v) |
Public Member Functions inherited from score::gfx::Node | |
| Node (const Node &)=delete | |
| Node (Node &&)=delete | |
| Node & | operator= (const Node &)=delete |
| Node & | operator= (Node &&)=delete |
| virtual void | renderedNodesChanged () |
| Whenever render nodes are added / removed. | |
| virtual void | update () |
| void | materialChange () noexcept |
| Used to notify a material change from the model to the renderers. | |
| bool | hasMaterialChanged (int64_t &renderer) const noexcept |
| void | renderTargetChange () noexcept |
| Used to notify a render target (texture inlet) change from the model to the renderers. | |
| bool | hasRenderTargetChanged (int64_t &renderer) const noexcept |
| bool | hasExplicitRenderTargetSize (int32_t port) const noexcept |
| Whether a given port has a user-specified render target size. | |
| bool | hasExplicitRenderTargetSpecs (int32_t port) const noexcept |
| Whether the user set a size or a format on a texture inlet. | |
| QSize | resolveRenderTargetSize (int32_t port, RenderList &renderer) const noexcept |
| RenderTargetSpecs | resolveRenderTargetSpecs (int32_t port, RenderList &renderer) const noexcept |
| std::optional< RenderTargetSpecs > | firstInputRenderTargetSpecs () const noexcept |
| What the first texture input asks to be rendered into. | |
| void | process (int32_t port, const ossia::render_target_spec &v) |
Public Attributes | |
| struct score::gfx::TexgenNode::ubo | ubo |
| std::atomic< func_t > | function {} |
Public Attributes inherited from score::gfx::ProcessNode | |
| ProcessUBO | standardUBO {} |
| Every node matching with a score process will have such an UBO. | |
| std::vector< int * > | m_event_ports |
| Values of the EVENT inputs: 1 for the frame they fire in, else 0. | |
Public Attributes inherited from score::gfx::Node | |
| std::vector< Port * > | input |
| Input ports of that node. | |
| ossia::small_pod_vector< Port *, 1 > | output |
| Output ports of that node. | |
| ossia::flat_map< RenderList *, score::gfx::NodeRenderer * > | renderedNodes |
| Map associating each RenderList to a Renderer for this model. | |
| ossia::flat_map< int32_t, ossia::render_target_spec > | renderTargetSpecs |
| Render target info. | |
| std::atomic_int64_t | materialChanged {0} |
| std::atomic_int64_t | renderTargetSpecChanged {-1} |
| int32_t | nodeId = score::gfx::invalid_node_index |
| bool | requiresDepth {} |
Static Public Attributes | |
| static const constexpr auto | vertex |
| static const constexpr auto | filter |
Additional Inherited Members | |
Protected Member Functions inherited from score::gfx::ProcessNode | |
| bool | fireEventPort (int32_t port, const ossia::value &v) noexcept |
Protected Attributes inherited from score::gfx::NodeModel | |
| std::unique_ptr< char[]> | m_materialData |
Member Function Documentation
◆ createRenderer()
|
inlineoverridevirtualnoexcept |
Create a renderer in a given context for this node.
Reimplemented from score::gfx::NodeModel.
Member Data Documentation
◆ filter
|
staticconstexpr |
Initial value:
= R"_(#version 450
layout(location = 0) in vec2 v_texcoord;
layout(location = 0) out vec4 fragColor;
layout(std140, binding = 0) uniform renderer_t {
mat4 clipSpaceCorrMatrix;
vec2 renderSize;
} renderer;
layout(binding=3) uniform sampler2D y_tex;
void main ()
{
fragColor = texture(y_tex, v_texcoord);
}
)_"
◆ vertex
|
staticconstexpr |
Initial value:
= R"_(#version 450
layout(location = 0) in vec2 position;
layout(location = 1) in vec2 texcoord;
layout(binding = 3) uniform sampler2D y_tex;
layout(location = 0) out vec2 v_texcoord;
layout(std140, binding = 0) uniform renderer_t {
mat4 clipSpaceCorrMatrix;
vec2 renderSize;
} renderer;
out gl_PerVertex { vec4 gl_Position; };
void main()
{
v_texcoord = texcoord;
gl_Position = renderer.clipSpaceCorrMatrix * vec4(position.xy, 0.0, 1.);
// The uploaded buffer's row 0 is its top, and it must come out at the top on
// every backend. Vulkan was left out of this correction, so a JIT Texgen -- and
// anything else painting a texture from C++ -- came out upside down there,
// through every sink: the window, the readback outputs and the GPU encoders
// alike.
#if !(defined(QSHADER_HLSL) || defined(QSHADER_MSL))
gl_Position.y = - gl_Position.y;
#endif
}
)_"
The documentation for this struct was generated from the following file:
Public Member Functions inherited from