#include <rendertowindowcomponent.h>
Public Types | |
| enum | EScaleMode : uint8 { Window = 0, Square = 1, Custom = 2 } |
Public Attributes | |
| ResourcePtr< RenderWindow > | mWindow = nullptr |
| Property: 'Window' the window target. More... | |
| MaterialInstanceResource | mMaterialInstanceResource |
| Property: 'MaterialInstance' material instance. More... | |
| EScaleMode | mMode = EScaleMode::Window |
| Property: 'ScaleMode' canvas scaling method. More... | |
| glm::vec2 | mRatio = { 1.0f, 1.0f } |
| Property: 'Ratio' ratio to use when mode is set to 'Custom'. More... | |
Public Attributes inherited from RenderableComponent | |
| bool | mVisible = true |
| Property: 'Visible' if this object is rendered to target by the render service. More... | |
| ResourcePtr< RenderLayer > | mLayer |
| Property: 'Layer' the render layer assigned to this component. More... | |
| std::vector< ResourcePtr< RenderTag > > | mTags |
| Property: 'Tags' List of tags specifying the category this render component belongs to. More... | |
Public Attributes inherited from Object | |
| std::string | mID |
| Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
Public Member Functions inherited from Component | |
| virtual void | getDependentComponents (std::vector< rtti::TypeInfo > &components) const |
| virtual const rtti::TypeInfo | getInstanceType () const =0 |
Public Member Functions inherited from Resource | |
| Resource () | |
Public Member Functions inherited from Object | |
| Object () | |
| virtual | ~Object () |
| virtual bool | init (utility::ErrorState &errorState) |
| virtual void | onDestroy () |
| Object (Object &)=delete | |
| Object & | operator= (const Object &)=delete |
| Object (Object &&)=delete | |
| Object & | operator= (Object &&)=delete |
Static Public Member Functions inherited from Object | |
| static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Renders a plane directly to a window using a custom material, centering and scaling it based on the selected mode. Use this component to, for example, present the output of a render-pass to screen.
Simply declare the component in json and call RenderToWindowComponent::draw() in the render part of your application. This component manages its own nap::PlaneMesh to render with, you only have to provide it with a material.
This component expects a material with a shader that contains both a model and projection matrix uniform. The view matrix uniform is optional. It will be set if found, otherwise bypassed. If you don't care about view space (camera) transformation, don't declare it.
|
strong |
| MaterialInstanceResource mMaterialInstanceResource |
Property: 'MaterialInstance' material instance.
| EScaleMode mMode = EScaleMode::Window |
Property: 'ScaleMode' canvas scaling method.
| glm::vec2 mRatio = { 1.0f, 1.0f } |
Property: 'Ratio' ratio to use when mode is set to 'Custom'.
| ResourcePtr<RenderWindow> mWindow = nullptr |
Property: 'Window' the window target.