Castor3D 0.12.0
Multiplatform 3D engine
Classes | Public Member Functions | List of all members
castor3d::RenderWindow Class Reference

#include <RenderWindow.hpp>

Inheritance diagram for castor3d::RenderWindow:
Inheritance graph
[legend]
Collaboration diagram for castor3d::RenderWindow:
Collaboration graph
[legend]

Classes

class  EvtHandler
 
class  InputListener
 

Public Member Functions

C3D_API RenderWindow (castor::String const &name, Engine &engine, castor::Size const &size, ashes::WindowHandle handle)
 Constructor. More...
 
C3D_API ~RenderWindow ()
 Destructor. More...
 
C3D_API void initialise (RenderTargetSPtr value)
 Initialises the render window with given RenderTarget. More...
 
C3D_API void cleanup ()
 Cleans up the instance. More...
 
C3D_API void update (CpuUpdater &updater)
 Updates the render window, CPU wise. More...
 
C3D_API void update (GpuUpdater &updater)
 Updates the render window, GPU wise. More...
 
C3D_API void upload (ashes::CommandBuffer const &cb)
 Uploads overlays GPU buffers to VRAM. More...
 
C3D_API void render (RenderInfo &info, bool signalOnly, crg::SemaphoreWaitArray &toWait)
 Renders one frame. More...
 
C3D_API void resize (uint32_t x, uint32_t y)
 Resizes the window. More...
 
C3D_API void resize (castor::Size const &size)
 Resizes the window. More...
 
C3D_API void setCamera (CameraSPtr camera)
 Sets the camera. More...
 
C3D_API void enableFullScreen (bool value)
 Changes fullscreen status. More...
 
C3D_API SceneRPtr getScene () const
 
C3D_API CameraSPtr getCamera () const
 
C3D_API ViewportType getViewportType () const
 
C3D_API void setViewportType (ViewportType value)
 Sets the ViewportType. More...
 
C3D_API void setScene (Scene &value)
 Sets the Scene. More...
 
C3D_API castor::Size getSize () const
 
C3D_API bool isUsingStereo () const
 
C3D_API void setStereo (bool stereo)
 Defines the stereo status. More...
 
C3D_API float getIntraOcularDistance () const
 Retrieves the intra ocular distance. More...
 
C3D_API void setIntraOcularDistance (float intraOcularDistance)
 Defines the intra ocular distance. More...
 
C3D_API VkFormat getPixelFormat () const
 
C3D_API void addPickingScene (Scene &scene)
 Adds a scene that can be picked. More...
 
C3D_API PickNodeType pick (castor::Position const &position)
 Picks a geometry at given mouse position. More...
 
C3D_API IntermediateViewArray const & listIntermediateViews () const
 
C3D_API GeometrySPtr getPickedGeometry () const
 
C3D_API SubmeshSPtr getPickedSubmesh () const
 
C3D_API uint32_t getPickedFace () const
 
C3D_API ShadowMapLightTypeArray getShadowMaps () const
 
uint32_t getIndex () const
 
FrameListenerSPtr getListener () const
 
RenderDevice const & getDevice () const
 
RenderTargetSPtr getRenderTarget () const
 
bool isVSyncEnabled () const
 
bool isFullscreen () const
 
bool isSkipped () const
 
castor::PxBufferBaseSPtr getSavedFrame () const
 
ashes::Surface const & getSurface () const
 
DebugConfiggetDebugConfig ()
 
ProgressBargetProgressBar ()
 
EventHandlerSPtr getEventHandler ()
 
C3D_API void enableLoading ()
 
void enableVSync (bool value)
 
void setFullscreen (bool value)
 
void enableSaveFrame ()
 

Constructor & Destructor Documentation

◆ RenderWindow()

C3D_API castor3d::RenderWindow::RenderWindow ( castor::String const &  name,
Engine engine,
castor::Size const &  size,
ashes::WindowHandle  handle 
)

Constructor.

Parameters
[in]engineThe engine.
[in]nameThe window name.
[in]sizeThe window size.
[in]handleThe native window handle.

◆ ~RenderWindow()

C3D_API castor3d::RenderWindow::~RenderWindow ( )

Destructor.

Member Function Documentation

◆ addPickingScene()

C3D_API void castor3d::RenderWindow::addPickingScene ( Scene scene)

Adds a scene that can be picked.

Parameters
[in]sceneThe scene.

◆ cleanup()

C3D_API void castor3d::RenderWindow::cleanup ( )

Cleans up the instance.

◆ enableFullScreen()

C3D_API void castor3d::RenderWindow::enableFullScreen ( bool  value)

Changes fullscreen status.

Parameters
[in]valueThe new status.

◆ enableLoading()

C3D_API void castor3d::RenderWindow::enableLoading ( )

name Mutators.

◆ enableSaveFrame()

void castor3d::RenderWindow::enableSaveFrame ( )
inline

◆ enableVSync()

void castor3d::RenderWindow::enableVSync ( bool  value)
inline

◆ getCamera()

C3D_API CameraSPtr castor3d::RenderWindow::getCamera ( ) const
Returns
The camera.

◆ getDebugConfig()

DebugConfig & castor3d::RenderWindow::getDebugConfig ( )
inline

◆ getDevice()

RenderDevice const & castor3d::RenderWindow::getDevice ( ) const
inline

◆ getEventHandler()

EventHandlerSPtr castor3d::RenderWindow::getEventHandler ( )
inline

◆ getIndex()

uint32_t castor3d::RenderWindow::getIndex ( ) const
inline

◆ getIntraOcularDistance()

C3D_API float castor3d::RenderWindow::getIntraOcularDistance ( ) const

Retrieves the intra ocular distance.

Returns
The intra ocular distance

◆ getListener()

FrameListenerSPtr castor3d::RenderWindow::getListener ( ) const
inline

◆ getPickedFace()

C3D_API uint32_t castor3d::RenderWindow::getPickedFace ( ) const

◆ getPickedGeometry()

C3D_API GeometrySPtr castor3d::RenderWindow::getPickedGeometry ( ) const

name Getters.

◆ getPickedSubmesh()

C3D_API SubmeshSPtr castor3d::RenderWindow::getPickedSubmesh ( ) const

◆ getPixelFormat()

C3D_API VkFormat castor3d::RenderWindow::getPixelFormat ( ) const
Returns
The window pixel format.

◆ getProgressBar()

ProgressBar & castor3d::RenderWindow::getProgressBar ( )
inline

◆ getRenderTarget()

RenderTargetSPtr castor3d::RenderWindow::getRenderTarget ( ) const
inline

◆ getSavedFrame()

castor::PxBufferBaseSPtr castor3d::RenderWindow::getSavedFrame ( ) const
inline

◆ getScene()

C3D_API SceneRPtr castor3d::RenderWindow::getScene ( ) const
Returns
The scene.

◆ getShadowMaps()

C3D_API ShadowMapLightTypeArray castor3d::RenderWindow::getShadowMaps ( ) const

◆ getSize()

C3D_API castor::Size castor3d::RenderWindow::getSize ( ) const
Returns
The window dimensions.

◆ getSurface()

ashes::Surface const & castor3d::RenderWindow::getSurface ( ) const
inline

◆ getViewportType()

C3D_API ViewportType castor3d::RenderWindow::getViewportType ( ) const
Returns
The ViewportType.

◆ initialise()

C3D_API void castor3d::RenderWindow::initialise ( RenderTargetSPtr  value)

Initialises the render window with given RenderTarget.

◆ isFullscreen()

bool castor3d::RenderWindow::isFullscreen ( ) const
inline

◆ isSkipped()

bool castor3d::RenderWindow::isSkipped ( ) const
inline

◆ isUsingStereo()

C3D_API bool castor3d::RenderWindow::isUsingStereo ( ) const
Returns
true if stereo is used.

◆ isVSyncEnabled()

bool castor3d::RenderWindow::isVSyncEnabled ( ) const
inline

◆ listIntermediateViews()

C3D_API IntermediateViewArray const & castor3d::RenderWindow::listIntermediateViews ( ) const
Returns
The intermediate views used by this render window.

◆ pick()

C3D_API PickNodeType castor3d::RenderWindow::pick ( castor::Position const &  position)

Picks a geometry at given mouse position.

Parameters
[in]positionThe position in the pass.
Returns
PickNodeType::eNone if nothing was picked.

◆ render()

C3D_API void castor3d::RenderWindow::render ( RenderInfo info,
bool  signalOnly,
crg::SemaphoreWaitArray &  toWait 
)

Renders one frame.

Parameters
[in,out]infoReceives the render infos.
[in]signalOnlytrue to only signal the semaphores.
[in]toWaitThe semaphores to wait.

◆ resize() [1/2]

C3D_API void castor3d::RenderWindow::resize ( castor::Size const &  size)

Resizes the window.

Parameters
[in]sizeThe new size.

◆ resize() [2/2]

C3D_API void castor3d::RenderWindow::resize ( uint32_t  x,
uint32_t  y 
)

Resizes the window.

Parameters
[in]x,yThe new size.

◆ setCamera()

C3D_API void castor3d::RenderWindow::setCamera ( CameraSPtr  camera)

Sets the camera.

Parameters
[in]cameraThe camera.

◆ setFullscreen()

void castor3d::RenderWindow::setFullscreen ( bool  value)
inline

◆ setIntraOcularDistance()

C3D_API void castor3d::RenderWindow::setIntraOcularDistance ( float  intraOcularDistance)

Defines the intra ocular distance.

Parameters
[in]intraOcularDistanceThe intra ocular distance.

◆ setScene()

C3D_API void castor3d::RenderWindow::setScene ( Scene value)

Sets the Scene.

Parameters
[in]valueThe new value.

◆ setStereo()

C3D_API void castor3d::RenderWindow::setStereo ( bool  stereo)

Defines the stereo status.

Parameters
[in]stereotrue if stereo is to be used.

◆ setViewportType()

C3D_API void castor3d::RenderWindow::setViewportType ( ViewportType  value)

Sets the ViewportType.

Parameters
[in]valueThe new value.

◆ update() [1/2]

C3D_API void castor3d::RenderWindow::update ( CpuUpdater updater)

Updates the render window, CPU wise.

Parameters
[in,out]updaterThe update data.

◆ update() [2/2]

C3D_API void castor3d::RenderWindow::update ( GpuUpdater updater)

Updates the render window, GPU wise.

Parameters
[in,out]updaterThe update data.

◆ upload()

C3D_API void castor3d::RenderWindow::upload ( ashes::CommandBuffer const &  cb)

Uploads overlays GPU buffers to VRAM.

Parameters
[in]cbThe command buffer on which transfer commands are recorded.

The documentation for this class was generated from the following file: