Nebula
Loading...
Searching...
No Matches
App::RenderApplication Class Reference

#include <renderapplication.h>

Detailed Description

Render application class with multithreaded rendering.

(C) 2008 Radon Labs GmbH (C) 2013-2018 Individual contributors, see AUTHORS file

Inherits App::Application.

Inherited by App::ViewerApplication.

Public Member Functions

 RenderApplication ()
 constructor
virtual ~RenderApplication ()
 destructor
void SetLogFileEnabled (bool b)
 enable/disable log file creation
void SetOverrideRootDirectory (const Util::String &rootDir)
 override root-directory
void SetMountStandardArchivesEnabled (bool b)
 enable/disable standard archive mounting
void SetMultithreadedRendering (bool b)
 set multithreaded rendering
void SetWindowData (const Util::Blob &data)
 sets the parent window
virtual bool Open ()
 open the application
virtual void Close ()
 close the application
virtual void Run ()
 run the application
Public Member Functions inherited from App::Application
 Application ()
 constructor
virtual ~Application ()
 destructor
void SetCompanyName (const Util::String &n)
 set company name
const Util::StringGetCompanyName () const
 get company name
void SetAppTitle (const Util::String &n)
 set application name
const Util::StringGetAppTitle () const
 get application name
void SetAppID (const Util::String &n)
 set application id
const Util::StringGetAppID () const
 get application id
void SetAppVersion (const Util::String &n)
 set application version
const Util::StringGetAppVersion () const
 get application version
void SetCmdLineArgs (const Util::CommandLineArgs &a)
 set command line args
const Util::CommandLineArgsGetCmdLineArgs () const
 get command line args
virtual void Exit ()
 exit the application, call right before leaving main()
bool IsOpen () const
 return true if app is open
int GetReturnCode () const
 get the return code

Protected Member Functions

Util::String LookupProjectDirectory ()
 lookup the toolkit project key in the registry (Win32 only!)
void SetQuitRequested (bool b)
 set quit requested flag
bool IsQuitRequested () const
 return true if quit requested
virtual void OnConfigureDisplay ()
 called to configure display
virtual void OnSetupResourceMappers ()
 called to setup resource mappers
virtual void OnProcessInput ()
 process input (called before rendering)
virtual void OnUpdateFrame ()
 update world
Timing::Time GetTime () const
 get current absolute time
Timing::Time GetFrameTime () const
 get current frame time
 _declare_timer (MainThreadFrameTimeAll)
 _declare_timer (MainThreadWaitForGraphicsFrame)
Protected Member Functions inherited from App::Application
void SetReturnCode (int c)
 set return code

Protected Attributes

Ptr< Core::CoreServercoreServer
Ptr< Jobs::JobSystem > jobSystem
Ptr< IO::GameContentServergameContentServer
Ptr< IO::IoServerioServer
Ptr< IO::IoInterfaceioInterface
Ptr< Graphics::GraphicsInterface > graphicsInterface
Ptr< Graphics::Display > display
Ptr< Input::InputServerinputServer
Ptr< FrameSync::FrameSyncTimerframeSyncTimer
Ptr< Resources::ResourceManager > resManager
Util::Blob windowData
Timing::Time time
Timing::Time frameTime
bool useMultithreadedRendering
bool quitRequested
bool logFileEnabled
bool mountStandardArchivesEnabled
Util::String overrideRootDirectory
Protected Attributes inherited from App::Application
Util::String companyName
Util::String appName
Util::String appID
Util::String appVersion
Util::CommandLineArgs args
bool isOpen
int returnCode

Private Member Functions

void UpdateTime ()
 update the current time values

Constructor & Destructor Documentation

◆ RenderApplication()

App::RenderApplication::RenderApplication ( )

constructor

◆ ~RenderApplication()

App::RenderApplication::~RenderApplication ( )
virtual

destructor

Member Function Documentation

◆ _declare_timer() [1/2]

App::RenderApplication::_declare_timer ( MainThreadFrameTimeAll )
protected

◆ _declare_timer() [2/2]

App::RenderApplication::_declare_timer ( MainThreadWaitForGraphicsFrame )
protected

◆ Close()

void App::RenderApplication::Close ( )
virtual

close the application

Reimplemented from App::Application.

Reimplemented in App::ViewerApplication.

◆ GetFrameTime()

Timing::Time App::RenderApplication::GetFrameTime ( ) const
inlineprotected

get current frame time

◆ GetTime()

Timing::Time App::RenderApplication::GetTime ( ) const
inlineprotected

get current absolute time

◆ IsQuitRequested()

bool App::RenderApplication::IsQuitRequested ( ) const
inlineprotected

return true if quit requested

◆ LookupProjectDirectory()

String App::RenderApplication::LookupProjectDirectory ( )
protected

lookup the toolkit project key in the registry (Win32 only!)

◆ OnConfigureDisplay()

void App::RenderApplication::OnConfigureDisplay ( )
protectedvirtual

called to configure display

◆ OnProcessInput()

void App::RenderApplication::OnProcessInput ( )
protectedvirtual

process input (called before rendering)

Reimplemented in App::ViewerApplication.

◆ OnSetupResourceMappers()

void App::RenderApplication::OnSetupResourceMappers ( )
protectedvirtual

called to setup resource mappers

Configure the resource mapper objects for the render thread.

NOTE: ResourceMapper objects are created and configured here (the main thread) and then HANDED OVER to the render thread. DO NOT access ResourceMappers after Display::Open() is called. It's best to create ResourceMappers and then immediately forget about them.

◆ OnUpdateFrame()

void App::RenderApplication::OnUpdateFrame ( )
protectedvirtual

update world

Reimplemented in App::ViewerApplication.

◆ Open()

bool App::RenderApplication::Open ( )
virtual

open the application

Reimplemented from App::Application.

Reimplemented in App::ViewerApplication.

◆ Run()

void App::RenderApplication::Run ( )
virtual

run the application

Reimplemented from App::Application.

◆ SetLogFileEnabled()

void App::RenderApplication::SetLogFileEnabled ( bool b)
inline

enable/disable log file creation

◆ SetMountStandardArchivesEnabled()

void App::RenderApplication::SetMountStandardArchivesEnabled ( bool b)
inline

enable/disable standard archive mounting

◆ SetMultithreadedRendering()

void App::RenderApplication::SetMultithreadedRendering ( bool b)
inline

set multithreaded rendering

◆ SetOverrideRootDirectory()

void App::RenderApplication::SetOverrideRootDirectory ( const Util::String & rootDir)
inline

override root-directory

◆ SetQuitRequested()

void App::RenderApplication::SetQuitRequested ( bool b)
inlineprotected

set quit requested flag

◆ SetWindowData()

void App::RenderApplication::SetWindowData ( const Util::Blob & data)
inline

sets the parent window

◆ UpdateTime()

void App::RenderApplication::UpdateTime ( )
private

update the current time values

Member Data Documentation

◆ coreServer

Ptr<Core::CoreServer> App::RenderApplication::coreServer
protected

◆ display

Ptr<Graphics::Display> App::RenderApplication::display
protected

◆ frameSyncTimer

Ptr<FrameSync::FrameSyncTimer> App::RenderApplication::frameSyncTimer
protected

◆ frameTime

Timing::Time App::RenderApplication::frameTime
protected

◆ gameContentServer

Ptr<IO::GameContentServer> App::RenderApplication::gameContentServer
protected

◆ graphicsInterface

Ptr<Graphics::GraphicsInterface> App::RenderApplication::graphicsInterface
protected

◆ inputServer

Ptr<Input::InputServer> App::RenderApplication::inputServer
protected

◆ ioInterface

Ptr<IO::IoInterface> App::RenderApplication::ioInterface
protected

◆ ioServer

Ptr<IO::IoServer> App::RenderApplication::ioServer
protected

◆ jobSystem

Ptr<Jobs::JobSystem> App::RenderApplication::jobSystem
protected

◆ logFileEnabled

bool App::RenderApplication::logFileEnabled
protected

◆ mountStandardArchivesEnabled

bool App::RenderApplication::mountStandardArchivesEnabled
protected

◆ overrideRootDirectory

Util::String App::RenderApplication::overrideRootDirectory
protected

◆ quitRequested

bool App::RenderApplication::quitRequested
protected

◆ resManager

Ptr<Resources::ResourceManager> App::RenderApplication::resManager
protected

◆ time

Timing::Time App::RenderApplication::time
protected

◆ useMultithreadedRendering

bool App::RenderApplication::useMultithreadedRendering
protected

◆ windowData

Util::Blob App::RenderApplication::windowData
protected

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