41 #ifndef _doublebufferedresource_cpp
42 #define _doublebufferedresource_cpp
62 {
return GetResource<DoubleBufferedLogger>(
DBRLogger).GetUsable(); }
77 { GetResource<DoubleBufferedLogger>(
DBRLogger).SwapUsableAndCommitable(); }
std::stringstream Logger
In case we ever replace the stringstream with another class, this will allow us to swap it out...
FrameScheduler * GetFrameScheduler()
Get a pointer to the FrameScheduler that owns this resource.
Whole GetLastPauseTime() const
How long was the pause, if any, last frame?
All the definitions for datatypes as well as some basic conversion functions are defined here...
Whole GetLastFrameTime() const
How long was the previous frame?
This file defines the template double buffered resources that can be attached to a thread...
static const Whole DBRLogger
Double buffered resources are identified by a Whole which is their type ID, This number identifies lo...
This file has the Declarations for the main FrameScheduler class.
virtual MaxInt GetCurrentFrameStart() const
When did this frame start?
virtual ~ThreadSpecificStorage()
Deletes all the resources.
This is central object in this algorithm, it is responsible for spawning threads and managing the ord...
ThreadSpecificStorage(FrameScheduler *Scheduler_)
A constructor that automatically creates the resources it supports.
Logger & GetUsableLogger()
Get the usable logger for this thread specific resource.
MaxInt GetCurrentFrameStart() const
When did this frame start?
A thread specific resource that uses double buffering to avoid multithreaded synchronization mechanis...
long long MaxInt
A large integer type suitable for compile time math and long term microsecond time keeping...
The bulk of the engine components go in this namspace.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
intptr_t ConvertiblePointer
A type that any pointer can be converted to and back from, and insures after the conversion back it w...
void SwapAllBufferedResources()
The commitable and usable version of every double buffered resource for this thread specific storage ...
Whole GetLastPauseTime() const
How long was the pause, if any, last frame?
Whole GetLastFrameTime() const
How long was the previous frame?