All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
MultiWidgets::RenderThread Class Reference

This class represents a single rendering thread. More...

#include <MultiWidgets/RenderThread.hpp>

Inheritance diagram for MultiWidgets::RenderThread:
Radiant::Thread Patterns::NotCopyable

Public Member Functions

const Luminous::RenderDriver & driver () const
 Get the RenderDriver used by this thread.
 
Luminous::RenderDriver & driver ()
 Get the RenderDriver used by this thread. More...
 
bool mainThreadInit ()
 
 RenderThread (ThreadedGfxDriver &host, const Luminous::MultiHead::Window &mhWin, unsigned int renderThread, Luminous::WindowEventHook *eventHook, MultiWidgets::Application &app)
 Creates a new rendering thread. More...
 
void setGPUId (int id)
 Sets the GPU id for storing information. More...
 
void stop ()
 Stops the rendering thread.
 
Luminous::Windowwindow ()
 Returns the window related to this rendering thread. More...
 
 ~RenderThread ()
 Destructor.
 
- Public Member Functions inherited from Radiant::Thread
bool isRunning () const
 Check if the thread is running. More...
 
void run ()
 Starts the thread.
 
void setName (const QString &name)
 Set the thread name. More...
 
 Thread (const QString &name="Radiant::Thread")
 Construct a thread structure. More...
 
bool waitEnd (int timeoutms=0)
 Waits until thread is finished. More...
 
virtual ~Thread ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from Radiant::Thread
typedef void * id_t
 Thread id type. More...
 
- Static Public Member Functions inherited from Radiant::Thread
static id_t myThreadId ()
 The id of the calling thread. More...
 

Detailed Description

This class represents a single rendering thread.

The thread will idle until commands from the Application class cause it to render a frame. This class is internally used by the ThreadedGfxDriver and shouldn't be instantiated directly.

Constructor & Destructor Documentation

MultiWidgets::RenderThread::RenderThread ( ThreadedGfxDriver host,
const Luminous::MultiHead::Window mhWin,
unsigned int  renderThread,
Luminous::WindowEventHook eventHook,
MultiWidgets::Application app 
)

Creates a new rendering thread.

Parameters
hostthreaded graphics driver owning this thread
mhWinwindow configuration for this thread
renderThreadindex for this thread
eventHookevent hook handler
appapplication that created the driver

Member Function Documentation

Luminous::RenderDriver& MultiWidgets::RenderThread::driver ( )

Get the RenderDriver used by this thread.

void MultiWidgets::RenderThread::setGPUId ( int  id)
inline

Sets the GPU id for storing information.

Parameters
idGPU index
Luminous::Window* MultiWidgets::RenderThread::window ( )
inline

Returns the window related to this rendering thread.

Returns
thread's window