Castor3D 0.16.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.
 
C3D_API ~RenderWindow () noexcept
 Destructor.
 
C3D_API void initialise (RenderWindowDesc const &desc)
 Initialises the render window with given RenderTarget.
 
C3D_API void cleanup ()
 Cleans up the instance.
 
C3D_API void update (CpuUpdater &updater)
 Updates the render window, CPU wise.
 
C3D_API void update (GpuUpdater &updater)
 Updates the render window, GPU wise.
 
C3D_API void upload (UploadData &uploader)
 Uploads overlays GPU buffers to VRAM.
 
C3D_API void render (RenderInfo &info, bool signalOnly, crg::SemaphoreWaitArray &toWait)
 Renders one frame.
 
C3D_API void resize (uint32_t x, uint32_t y)
 Resizes the window.
 
C3D_API void resize (castor::Size const &size)
 Resizes the window.
 
C3D_API void setCamera (Camera &camera) const
 Sets the camera.
 
C3D_API void enableFullScreen (bool value)
 Changes fullscreen status.
 
C3D_API SceneRPtr getScene () const
 
C3D_API CameraRPtr getCamera () const
 
C3D_API ViewportType getViewportType () const
 
C3D_API void setViewportType (ViewportType value) const
 Sets the ViewportType.
 
C3D_API void setScene (Scene &value) const
 Sets the Scene.
 
C3D_API castor::Size getSize () const
 
C3D_API bool isUsingStereo () const
 
C3D_API void setStereo (bool stereo) const
 Defines the stereo status.
 
C3D_API float getIntraOcularDistance () const
 Retrieves the intra ocular distance.
 
C3D_API void setIntraOcularDistance (float intraOcularDistance) const
 Defines the intra ocular distance.
 
C3D_API VkFormat getPixelFormat () const
 
C3D_API PickNodeType pick (castor::Position const &position)
 Picks a geometry at given mouse position.
 
C3D_API void destroyLoadingScreen ()
 Destroys the loading scene.
 
C3D_API void createLoadingScreen ()
 Creates the loading scene.
 
C3D_API GeometryRPtr getPickedGeometry () const
 
C3D_API Submesh const * getPickedSubmesh () const
 
C3D_API uint32_t getPickedFace () const
 
C3D_API ShadowMapLightTypeArray getShadowMaps () const
 
C3D_API ShadowBuffergetShadowBuffer () const
 
uint32_t getIndex () const noexcept
 
FrameListenerRPtr getListener () const noexcept
 
RenderDevice const & getDevice () const noexcept
 
RenderTargetRPtr getRenderTarget () const noexcept
 
bool isVSyncEnabled () const noexcept
 
bool isFullscreen () const noexcept
 
bool isSkipped () const noexcept
 
castor::PxBufferBaseRPtr getSavedFrame () const noexcept
 
ashes::Surface const & getSurface () const noexcept
 
ProgressBargetProgressBar () noexcept
 
EventHandlerRPtr getEventHandler () const noexcept
 
C3D_API void enableLoading ()
 
C3D_API void allowHdrSwapchain (bool value=true)
 
void enableVSync (bool value) noexcept
 
void setFullscreen (bool value) noexcept
 
void enableSaveFrame (bool value=true) noexcept
 
- Public Member Functions inherited from castor::OwnedBy< Engine >
Engine * getOwner () const
 
- Public Member Functions inherited from castor::NamedBaseT< T >
 NamedBaseT (T name) noexcept
 Constructor.
 
T const & getName () const noexcept
 Retrieves the name.
 
void rename (T name) noexcept
 

Additional Inherited Members

- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner)
 Constructor.
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

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 ( )
noexcept

Destructor.

Member Function Documentation

◆ allowHdrSwapchain()

C3D_API void castor3d::RenderWindow::allowHdrSwapchain ( bool value = true)

◆ cleanup()

C3D_API void castor3d::RenderWindow::cleanup ( )

Cleans up the instance.

◆ createLoadingScreen()

C3D_API void castor3d::RenderWindow::createLoadingScreen ( )

Creates the loading scene.

◆ destroyLoadingScreen()

C3D_API void castor3d::RenderWindow::destroyLoadingScreen ( )

Destroys the loading scene.

◆ 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 ( bool value = true)
inlinenoexcept

◆ enableVSync()

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

◆ getCamera()

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

◆ getDevice()

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

◆ getEventHandler()

EventHandlerRPtr castor3d::RenderWindow::getEventHandler ( ) const
inlinenoexcept

◆ getIndex()

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

◆ getIntraOcularDistance()

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

Retrieves the intra ocular distance.

Returns
The intra ocular distance

◆ getListener()

FrameListenerRPtr castor3d::RenderWindow::getListener ( ) const
inlinenoexcept

◆ getPickedFace()

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

◆ getPickedGeometry()

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

name Getters.

◆ getPickedSubmesh()

C3D_API Submesh const * castor3d::RenderWindow::getPickedSubmesh ( ) const

◆ getPixelFormat()

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

◆ getProgressBar()

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

References CU_Require.

◆ getRenderTarget()

RenderTargetRPtr castor3d::RenderWindow::getRenderTarget ( ) const
inlinenoexcept

◆ getSavedFrame()

castor::PxBufferBaseRPtr castor3d::RenderWindow::getSavedFrame ( ) const
inlinenoexcept

◆ getScene()

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

◆ getShadowBuffer()

C3D_API ShadowBuffer * castor3d::RenderWindow::getShadowBuffer ( ) const

◆ 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
inlinenoexcept

References CU_Require.

◆ getViewportType()

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

◆ initialise()

C3D_API void castor3d::RenderWindow::initialise ( RenderWindowDesc const & desc)

Initialises the render window with given RenderTarget.

◆ isFullscreen()

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

◆ isSkipped()

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

◆ isUsingStereo()

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

◆ isVSyncEnabled()

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

◆ 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 ( Camera & camera) const

Sets the camera.

Parameters
[in]cameraThe camera.

◆ setFullscreen()

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

◆ setIntraOcularDistance()

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

Defines the intra ocular distance.

Parameters
[in]intraOcularDistanceThe intra ocular distance.

◆ setScene()

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

Sets the Scene.

Parameters
[in]valueThe new value.

◆ setStereo()

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

Defines the stereo status.

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

◆ setViewportType()

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

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 ( UploadData & uploader)

Uploads overlays GPU buffers to VRAM.

Parameters
[in,out]uploaderReceives the upload requests.

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