NAP
Public Attributes | List of all members
RenderVideoComponent Class Reference

#include <rendervideocomponent.h>

Public Attributes

ResourcePtr< VideoPlayermVideoPlayer = nullptr
 Property: 'VideoPlayer' the video player to render to texture. More...
 
ResourcePtr< RenderTexture2DmOutputTexture = nullptr
 Property: 'OutputTexture' the RGB8 texture to render output to. More...
 
ERasterizationSamples mRequestedSamples = ERasterizationSamples::One
 Property: 'Samples' The number of samples used during Rasterization. For better results enable 'SampleShading'. More...
 
RGBAColor8 mClearColor = { 255, 255, 255, 255 }
 Property: 'ClearColor' the color that is used to clear the render target. More...
 
- Public Attributes inherited from RenderableComponent
bool mVisible = true
 Property: 'Visible' if this object is rendered to target by the render service. More...
 
ResourcePtr< RenderLayermLayer
 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
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 
- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Renders the output of a nap::VideoPlayer directly to texture without having to define a render target, shader or mesh. This components converts the YUV textures, generated by the nap::VideoPlayer, into an RGB texture. Call draw() in your application render() call, in between nap::RenderService::beginHeadlessRecording() and nap::RenderService::endHeadlessRecording(). The video frame is scaled to fit the dimensions of the given output texture. It is still possible to render this component using the render service, although only orthographic cameras are supported.

Inheritance diagram for RenderVideoComponent:
[legend]
Collaboration diagram for RenderVideoComponent:
[legend]

Member Data Documentation

◆ mClearColor

RGBAColor8 mClearColor = { 255, 255, 255, 255 }

Property: 'ClearColor' the color that is used to clear the render target.

◆ mOutputTexture

ResourcePtr<RenderTexture2D> mOutputTexture = nullptr

Property: 'OutputTexture' the RGB8 texture to render output to.

◆ mRequestedSamples

Property: 'Samples' The number of samples used during Rasterization. For better results enable 'SampleShading'.

◆ mVideoPlayer

ResourcePtr<VideoPlayer> mVideoPlayer = nullptr

Property: 'VideoPlayer' the video player to render to texture.