This is the main entry point for the entire library. More...
#include <entresol.h>
Public Types | |
typedef ManagerFactoryMap::const_iterator | ConstManagerFactoryIterator |
Const Iterator type for manager factories stored by this class. | |
typedef ManagerContainer::const_iterator | ConstManagerIterator |
Const Iterator type for managers stored by this class. | |
typedef ManagerVec::const_iterator | ConstManagerVecIterator |
Const Iterator type for containers of pre-created managers. | |
typedef WorldContainer::const_iterator | ConstWorldIterator |
Const Iterator type for Worlds stored by this class. | |
typedef std::list< EntresolManager * > | ManagerContainer |
Basic container type for normal manager storage in this class. | |
typedef ManagerFactoryMap::iterator | ManagerFactoryIterator |
Iterator type for manager factories stored by this class. | |
typedef std::map< String, EntresolManagerFactory * > | ManagerFactoryMap |
Basic container type for factories that construct known manager types. | |
typedef std::vector< EntresolManagerFactory * > | ManagerFactoryVec |
Basic container type for factories that construct known manager types. | |
typedef ManagerContainer::iterator | ManagerIterator |
Iterator type for managers stored by this class. | |
typedef std::vector< EntresolManager * > | ManagerVec |
Container type for passing pre-created managers into the Entresol upon creation. | |
typedef ManagerVec::iterator | ManagerVecIterator |
Iterator type for containers of pre-created managers. | |
typedef std::vector< World * > | WorldContainer |
Basic container type for World storage. | |
typedef WorldContainer::iterator | WorldIterator |
Iterator type for Worlds stored by this class. | |
Public Member Functions | |
Entresol (const String &EngineDataPath, const Resource::ArchiveType ArchType, const String &InitializerFile="Mezzanine.mxi") | |
Initializer file constructor. More... | |
Entresol (ManagerFactoryVec &CustomFactories, const String &EngineDataPath, const Resource::ArchiveType ArchType, const String &InitializerFile="Mezzanine.mxi") | |
Factory and initializer file constructor. More... | |
Entresol (const String &EngineDataPath, const String &LogFileName="Mezzanine.log") | |
Descriptive constructor With Manager Pointers. More... | |
Entresol (const String &EngineDataPath, const String &LogFileName, const ManagerVec &ManagersToBeAdded) | |
Descriptive constructor. More... | |
Entresol () | |
Default constructor. More... | |
~Entresol () | |
Deconstructor. More... | |
Threading::LogAggregator * | _GetLogAggregator () |
This is used to asynchronously handle log messages. More... | |
Logger & | _GetLogStream (Threading::ThreadId ID=Threading::this_thread::get_id()) |
A nearly threadsafe logging sink. More... | |
template<class T > | |
void | _Log (const T &Message) |
Runtime event and message logging. More... | |
void | _LogString (const String &Message) |
Log String directly with no conversion. More... | |
void | AddManager (EntresolManager *ManagerToAdd) |
This adds a manager, in the correct order, to the list that the Entresol calls on. More... | |
void | AddWorld (World *WorldToBeAdded) |
This adds a world to the list of worlds in the entresol. More... | |
void | BreakMainLoop (Boole Break=true) |
This makes the main loop end after it's current frame (or cancels a previous attempt to do so). More... | |
EntresolManager * | CreateManager (const String &ManagerImplName, const NameValuePairList &Params, const Boole AddToEntresol=true) |
Creates a new manager. More... | |
EntresolManager * | CreateManager (const String &ManagerImplName, const XML::Node &XMLNode, const Boole AddToEntresol=true) |
Creates a new manager. More... | |
World * | CreateWorld (const String &WorldName) |
This creates a world and adds it to the World List. More... | |
World * | CreateWorld (const String &WorldName, const std::vector< WorldManager * > &ManagerToBeAdded) |
This creates a world and adds it to the World List. More... | |
World * | CreateWorld (const String &WorldName, const Physics::ManagerConstructionInfo &PhysicsInfo, const String &SceneType) |
This creates a world and adds it to the World List. More... | |
World * | CreateWorld (const String &WorldName, const std::vector< WorldManager * > &ManagersToBeAdded, const Physics::ManagerConstructionInfo &PhysicsInfo, const String &SceneType) |
This creates a world and adds it to the World List. More... | |
void | Deinitialize () |
This deinitializeds all managers and Worlds currently in the Entresol. | |
void | DestroyAllManagers () |
Destroys all managers currently in the Entresol. More... | |
void | DestroyAllWorlds () |
This destroys all the worlds in the world list. | |
void | DestroyManager (EntresolManager *ToBeDestroyed) |
Destroys a manager. More... | |
void | DestroyWorld (World *WorldToBeDestroyed) |
This destroys the given world and removes it from the world list. More... | |
void | DestroyWorldByName (const String &WorldName) |
This destroys the world with the given name and removes it from the world list. More... | |
void | DoOneFrame () |
Run one frame. More... | |
Whole | GetFrameCount () const |
How many frames have elasped? More... | |
Whole | GetLastFrameTimeMicroseconds () const |
Gets the amount of time since the last time the last frame took to run. More... | |
Whole | GetLastFrameTimeMilliseconds () const |
Gets the amount of time since the last time the last frame took to run. More... | |
EntresolManager * | GetManager (const Whole RetrieveType, UInt16 WhichOne=0) |
This is will find the manager of a given type. More... | |
UInt16 | GetNumWorlds () |
This gets the number of worlds in the world list. More... | |
Threading::FrameScheduler & | GetScheduler () |
Gets the core structure responsible for scheduling work in the Entresol main loop. More... | |
Whole | GetTargetFrameTimeMicroseconds () const |
Retrieves the amount of milliseconds we would like each iteration of the Main Loop to be. More... | |
Whole | GetTargetFrameTimeMilliseconds () const |
Retrieves the amount of milliseconds we would like each iteration of the Main Loop to be. More... | |
World * | GetWorld (const String &WorldName) |
This gets a world from the world list by name. More... | |
World * | GetWorld (const Whole Index) |
This gets a world from the world list by index. More... | |
void | Initialize (const Boole InitWorlds) |
This initializes all managers and Worlds currently in the Entresol. More... | |
void | MainLoop () |
This Function house the main loop. More... | |
void | PauseAllWorlds (Boole Pause) |
Pauses all animations, particles, and object movement throughout all worlds. More... | |
void | PreMainLoopInit () |
Initialize any default managers and any added after construction. This should be called before DoOneFrame() | |
void | RemoveAllWorlds () |
This removes all worlds from the world list. | |
void | RemoveManager (EntresolManager *ManagerToRemove) |
This removes a manager by finding the matching pointer. More... | |
void | RemoveManager (const Whole RemoveType, UInt16 WhichOne=0) |
This removes a manager of a specific type from the list. More... | |
World * | RemoveWorld (World *WorldToBeRemoved) |
This removes the given world from the world list. More... | |
World * | RemoveWorldByName (const String &WorldName) |
This removes the world with the given name from the world list. More... | |
void | SetTargetFrameRate (const Whole NewFrameRate) |
This sets a new Target Frame Rate. More... | |
void | SetTargetFrameTimeMicroseconds (const Whole NewTargetTime) |
This sets a new target time microseconds. More... | |
void | SetTargetFrameTimeMilliseconds (const Whole NewTargetTime) |
This sets a new target time in milliseconds. More... | |
Public Member Functions inherited from Mezzanine::Singleton< Entresol > | |
~Singleton () | |
Class destructor. | |
Static Public Member Functions | |
static void | AddAllEngineDefaultManagerFactories () |
Adds all the default manager factories provided by the engine to the Entresol. | |
static void | AddManagerFactory (EntresolManagerFactory *ToBeAdded) |
Adds/registers a manager factory with this Entresol, allowing it to be constructed through this API. More... | |
static void | DestroyAllManagerFactories () |
Destroys all manager factories in this Entresol. More... | |
static void | DestroyManagerFactory (EntresolManagerFactory *ToBeRemoved) |
Removes and destroys a manager factory in this Entresol. More... | |
static void | DestroyManagerFactory (const String &ImplName) |
Removes and destroys a manager factory in this Entresol. More... | |
static void | RemoveManagerFactory (EntresolManagerFactory *ToBeRemoved) |
Removes a manager factory from this Entresol. More... | |
static void | RemoveManagerFactory (const String &ImplName) |
Removes a manager factory from this Entresol. More... | |
Static Public Member Functions inherited from Mezzanine::Singleton< Entresol > | |
static Entresol * | GetSingletonPtr () |
Fetches a pointer to the singleton. More... | |
static Boole | SingletonValid () |
Checks to see if the singleton pointer is valid. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Mezzanine::Singleton< Entresol > | |
Singleton () | |
Class constructor. | |
Static Protected Attributes inherited from Mezzanine::Singleton< Entresol > | |
static Entresol * | SingletonPtr |
The one and only pointer to the single object. More... | |
This is the main entry point for the entire library.
The entresol coordinates and integrates all the underlying subsystems, Currently Ogre3d is used for 3d Graphics, Bullet is used for physics, and SDL is used for user input and window management. Games will need a container for all the playing pieces. It makes sense to tie all of this functionality into one core object.
Definition at line 324 of file entresol.h.
Mezzanine::Entresol::Entresol | ( | const String & | EngineDataPath, |
const Resource::ArchiveType | ArchType, | ||
const String & | InitializerFile = "Mezzanine.mxi" |
||
) |
Initializer file constructor.
This function expects an ".mxi" (Mezzanine XML Initializer) file. If the file provided is not one of this type this function will throw an exception.
When initializing factories in the XML file this constructor does not initialize any additional manager factories, so if they are called this will throw an exception.
EngineDataPath | The directory where engine specific data resides. This is where it will search for the specified initializer file. |
ArchType | The type of archive at the path provided. |
InitializerFile | The file that describes how to initialize Mezzanine. |
Definition at line 113 of file entresol.cpp.
Mezzanine::Entresol::Entresol | ( | ManagerFactoryVec & | CustomFactories, |
const String & | EngineDataPath, | ||
const Resource::ArchiveType | ArchType, | ||
const String & | InitializerFile = "Mezzanine.mxi" |
||
) |
Factory and initializer file constructor.
This function expects an ".mxi" (Mezzanine XML Initializer) file. If the file provided is not one of this type this function will throw an exception.
Also default factories are already added and thus do not need to be included in the Factory vector.
CustomFactories | A vector containing the additional factories to be registered before initializing the engine. |
EngineDataPath | The directory where engine specific data resides. This is where it will search for the specified initializer file. |
ArchType | The type of archive at the path provided. |
InitializerFile | The file that describes how to initialize Mezzanine. |
Definition at line 122 of file entresol.cpp.
Mezzanine::Entresol::Entresol | ( | const String & | EngineDataPath, |
const String & | LogFileName = "Mezzanine.log" |
||
) |
Descriptive constructor With Manager Pointers.
EngineDataPath | The directory where engine specific data (as opposed to game/application data) reside, and it include the plugins file and potentially other low level resources. |
LogFileName | This is the place that log messages get sent to. |
Definition at line 136 of file entresol.cpp.
Mezzanine::Entresol::Entresol | ( | const String & | EngineDataPath, |
const String & | LogFileName, | ||
const ManagerVec & | ManagersToBeAdded | ||
) |
Descriptive constructor.
This constructor allows for an easier way to define the boundaries for items moving about inside the entresol. This constructor provides no default arguments, but allows for a lot of customization. In addition to everything the other constructors this one can accept a vector of pointers to managers which will be added.
EngineDataPath | The directory where engine specific data (as opposed to game/application data) reside, and it include the plugins file and potentially othe low level resources. |
LogFileName | This is the place that log messages get sent to. |
ManagersToBeAdded | This is a vector of manager pointers that will be used instead of creating new ones. |
Definition at line 142 of file entresol.cpp.
Mezzanine::Entresol::Entresol | ( | ) |
Default constructor.
This simply performs the same work as the descriptive constructor with some sane defaults.
Definition at line 107 of file entresol.cpp.
Mezzanine::Entresol::~Entresol | ( | ) |
Deconstructor.
This Tears down all the items created by the entresol, and safely frees any graphical resources, we will also delete any Objects passed into the entresol by pointer. We will not delete any pointers we pass out (like from the Events from the Event manager).
Definition at line 147 of file entresol.cpp.
Threading::LogAggregator * Mezzanine::Entresol::_GetLogAggregator | ( | ) |
This is used to asynchronously handle log messages.
Definition at line 983 of file entresol.cpp.
Logger & Mezzanine::Entresol::_GetLogStream | ( | Threading::ThreadId | ID = Threading::this_thread::get_id() | ) |
A nearly threadsafe logging sink.
If ID is not supplied and the thread is managed by the framescheduler this should be thread safe.
ID | Defaults to the id of the current thread, but can be used to retrieve the logger for any thread. |
This | throws a ParametersRangeException if the thread is not managed by the frame scheduler or it Threading::FrameScheduler::CreateThreads() has not been called (It creates the ThreadSpecific resources that contain the Loggers). |
Definition at line 974 of file entresol.cpp.
|
inline |
Runtime event and message logging.
Message | This is what will be streamed to the log. |
Anything | GetLogStream could throw. |
Definition at line 686 of file entresol.h.
void Mezzanine::Entresol::_LogString | ( | const String & | Message | ) |
Log String directly with no conversion.
Message | The string to log. |
Anything | GetLogStream could throw. |
Definition at line 967 of file entresol.cpp.
void Mezzanine::Entresol::AddManager | ( | EntresolManager * | ManagerToAdd | ) |
This adds a manager, in the correct order, to the list that the Entresol calls on.
ManagerToAdd | The pointer to the manager to be added. |
Definition at line 778 of file entresol.cpp.
|
static |
Adds/registers a manager factory with this Entresol, allowing it to be constructed through this API.
ToBeAdded | The manager factory to be added. |
Definition at line 621 of file entresol.cpp.
void Mezzanine::Entresol::AddWorld | ( | World * | WorldToBeAdded | ) |
This adds a world to the list of worlds in the entresol.
WorldToAdd | The pointer to the world to be added. |
Definition at line 862 of file entresol.cpp.
void Mezzanine::Entresol::BreakMainLoop | ( | Boole | Break = true | ) |
This makes the main loop end after it's current frame (or cancels a previous attempt to do so).
Break | If true this will break the main loop after the next iteration or the end of the current one. If false the main loop will just keep running. |
If called while not in the main loop, it will affect the next main loop iteration. This function is thread safe and can be called from any work unit at any time.
Definition at line 579 of file entresol.cpp.
EntresolManager * Mezzanine::Entresol::CreateManager | ( | const String & | ManagerImplName, |
const NameValuePairList & | Params, | ||
const Boole | AddToEntresol = true |
||
) |
Creates a new manager.
ManagerImplName | The name of the manager implementation to create. |
Params | A list of name-value pairs for the params that are to be used when creating the manager. |
AddToEntresol | Whether or not to add the created manager to the Entresol after creation. |
Definition at line 708 of file entresol.cpp.
EntresolManager * Mezzanine::Entresol::CreateManager | ( | const String & | ManagerImplName, |
const XML::Node & | XMLNode, | ||
const Boole | AddToEntresol = true |
||
) |
Creates a new manager.
ManagerImplName | The name of the manager implementation to create. |
XMLNode | An XML node containing all construction and initialization info for the manager to be created. |
AddToEntresol | Whether or not to add the created manager to the Entresol after creation. |
Definition at line 720 of file entresol.cpp.
This creates a world and adds it to the World List.
WorldName | String name of the world. |
Definition at line 833 of file entresol.cpp.
World * Mezzanine::Entresol::CreateWorld | ( | const String & | WorldName, |
const std::vector< WorldManager * > & | ManagerToBeAdded | ||
) |
This creates a world and adds it to the World List.
WorldName | String name of the world. |
Managers | A container of pre-made managers to be used by this world. |
Definition at line 840 of file entresol.cpp.
World * Mezzanine::Entresol::CreateWorld | ( | const String & | WorldName, |
const Physics::ManagerConstructionInfo & | PhysicsInfo, | ||
const String & | SceneType | ||
) |
This creates a world and adds it to the World List.
WorldName | String name of the world. |
PhysicsInfo | A ManagerConstructionInfo struct with data on how to configure the physics for this world. |
SceneType | A string containing the name of the underlying scene type for this world. |
Definition at line 847 of file entresol.cpp.
World * Mezzanine::Entresol::CreateWorld | ( | const String & | WorldName, |
const std::vector< WorldManager * > & | ManagersToBeAdded, | ||
const Physics::ManagerConstructionInfo & | PhysicsInfo, | ||
const String & | SceneType | ||
) |
This creates a world and adds it to the World List.
WorldName | String name of the world. |
ManagersToBeAdded | A container of pre-made managers to be used by this world. |
PhysicsInfo | A ManagerConstructionInfo struct with data on how to configure the physics for this world. |
SceneType | A string containing the name of the underlying scene type for this world. |
Definition at line 854 of file entresol.cpp.
|
static |
Destroys all manager factories in this Entresol.
Definition at line 652 of file entresol.cpp.
void Mezzanine::Entresol::DestroyAllManagers | ( | ) |
Destroys all managers currently in the Entresol.
Definition at line 742 of file entresol.cpp.
void Mezzanine::Entresol::DestroyManager | ( | EntresolManager * | ToBeDestroyed | ) |
Destroys a manager.
ToBeDestroyed | The manager to be destroyed. |
Definition at line 732 of file entresol.cpp.
|
static |
Removes and destroys a manager factory in this Entresol.
ToBeRemoved | A pointer to the manager factory that is to be removed and destroyed. |
Definition at line 638 of file entresol.cpp.
|
static |
Removes and destroys a manager factory in this Entresol.
ImplName | The name of the manager implementation created by the factory to be removed and destroyed. |
Definition at line 643 of file entresol.cpp.
void Mezzanine::Entresol::DestroyWorld | ( | World * | WorldToBeDestroyed | ) |
This destroys the given world and removes it from the world list.
WorldToBeDestroyed | The name of the world to be destroyed. |
Definition at line 920 of file entresol.cpp.
void Mezzanine::Entresol::DestroyWorldByName | ( | const String & | WorldName | ) |
This destroys the world with the given name and removes it from the world list.
WorldName | The name of the world to be destroyed. |
Definition at line 933 of file entresol.cpp.
void Mezzanine::Entresol::DoOneFrame | ( | ) |
Run one frame.
This should only be called after Managers and other Pre Main loop items
Definition at line 560 of file entresol.cpp.
Whole Mezzanine::Entresol::GetFrameCount | ( | ) | const |
How many frames have elasped?
Definition at line 590 of file entresol.cpp.
Whole Mezzanine::Entresol::GetLastFrameTimeMicroseconds | ( | ) | const |
Gets the amount of time since the last time the last frame took to run.
This returns, in microseconds the amount of time since the frame started.
Definition at line 615 of file entresol.cpp.
Whole Mezzanine::Entresol::GetLastFrameTimeMilliseconds | ( | ) | const |
Gets the amount of time since the last time the last frame took to run.
This returns, in milliseconds the amount of time since the frame started.
Definition at line 612 of file entresol.cpp.
EntresolManager * Mezzanine::Entresol::GetManager | ( | const Whole | RetrieveType, |
UInt16 | WhichOne = 0 |
||
) |
This is will find the manager of a given type.
RetrieveType | The type ID of the manager to get. Use ManagerBase::ManagerType enum values for this. |
WhichOne | If not getting the first/only manager of the given type, get one. |
Definition at line 792 of file entresol.cpp.
UInt16 Mezzanine::Entresol::GetNumWorlds | ( | ) |
This gets the number of worlds in the world list.
Definition at line 884 of file entresol.cpp.
Threading::FrameScheduler & Mezzanine::Entresol::GetScheduler | ( | ) |
Gets the core structure responsible for scheduling work in the Entresol main loop.
Definition at line 495 of file entresol.cpp.
Whole Mezzanine::Entresol::GetTargetFrameTimeMicroseconds | ( | ) | const |
Retrieves the amount of milliseconds we would like each iteration of the Main Loop to be.
In practice I've done some more testing, started out digging through the code to see if there was anything wrong, there seemed to be random extra words inside our code that the compiler didn't mind that shouldn't be there. like there was a " Schedule : " right after a line where a pointer was initialized. I only found such occurrences in gamebase.cpp though, removed them and did two tests. First test I was just randomly clicking and then I inadvertently threw the metal sphere down into the abyss, the sphere was really close to the camera when this happened, about to go over. Second time I ran the game trying to click stuff, I simply couldn't click anything. I even tried zooming in on the robots, although I can only get so close to them before I have to tamper with the camera, which I haven't done yet, but there were no results with the Robots. The third time I was successfully able to stop two spheres and move them around the platform quite smoothly. These spheres were slightly further away from the camera compared to the first run. I stopped the wooden sphere and the second metal sphere. I included a screen shot and a copy of my log for the third run. The spheres in the screenshot are both in a rest position.dware performance or timing concerns can cause this goal to be unnaitanable or trivially easy. The main loop with actually pause execution until this amount of time is reach is main loop iteration, However, the mainloop will always skip waiting if hardware is overburdened.
Definition at line 609 of file entresol.cpp.
Whole Mezzanine::Entresol::GetTargetFrameTimeMilliseconds | ( | ) | const |
Retrieves the amount of milliseconds we would like each iteration of the Main Loop to be.
In practice I've done some more testing, started out digging through the code to see if there was anything wrong, there seemed to be random extra words inside our code that the compiler didn't mind that shouldn't be there. like there was a " Schedule : " right after a line where a pointer was initialized. I only found such occurrences in gamebase.cpp though, removed them and did two tests. First test I was just randomly clicking and then I inadvertently threw the metal sphere down into the abyss, the sphere was really close to the camera when this happened, about to go over. Second time I ran the game trying to click stuff, I simply couldn't click anything. I even tried zooming in on the robots, although I can only get so close to them before I have to tamper with the camera, which I haven't done yet, but there were no results with the Robots. The third time I was successfully able to stop two spheres and move them around the platform quite smoothly. These spheres were slightly further away from the camera compared to the first run. I stopped the wooden sphere and the second metal sphere. I included a screen shot and a copy of my log for the third run. The spheres in the screenshot are both in a rest position.dware performance or timing concerns can cause this goal to be unnaitanable or trivially easy. The main loop with actually pause execution until this amount of time is reach is main loop iteration, However, the mainloop will always skip waiting if hardware is overburdened.
Definition at line 606 of file entresol.cpp.
This gets a world from the world list by name.
WorldName | The string name of the world to retrieve. |
Definition at line 867 of file entresol.cpp.
This gets a world from the world list by index.
WorldIndex | The index of the world to retrieve. |
Definition at line 879 of file entresol.cpp.
void Mezzanine::Entresol::Initialize | ( | const Boole | InitWorlds | ) |
This initializes all managers and Worlds currently in the Entresol.
InitWorlds | Whether or not to initialize every World stored in this manager. If false, then only Entresol managers will be initialized. |
Definition at line 501 of file entresol.cpp.
void Mezzanine::Entresol::MainLoop | ( | ) |
This Function house the main loop.
If using this you don't need to worry about initialization of managers or other pre main loop items.
Definition at line 550 of file entresol.cpp.
void Mezzanine::Entresol::PauseAllWorlds | ( | Boole | Pause | ) |
Pauses all animations, particles, and object movement throughout all worlds.
Pause | Pauses the world if true, unpauses if false. |
Definition at line 956 of file entresol.cpp.
void Mezzanine::Entresol::RemoveManager | ( | EntresolManager * | ManagerToRemove | ) |
This removes a manager by finding the matching pointer.
ManagerToRemove | A pointer to the manager to be removed. |
Definition at line 804 of file entresol.cpp.
This removes a manager of a specific type from the list.
RemoveType | The type ID of the manager to remove. Use ManagerBase::ManagerType enum values for this. |
WhichOne | If not removing the first/only manager of the given type, which one by count are you erasing. |
Definition at line 815 of file entresol.cpp.
|
static |
Removes a manager factory from this Entresol.
ToBeRemoved | A pointer to the manager factory that is to be removed. |
Definition at line 626 of file entresol.cpp.
|
static |
Removes a manager factory from this Entresol.
ImplName | The name of the manager implementation created by the factory to be removed. |
Definition at line 631 of file entresol.cpp.
This removes the given world from the world list.
WorldToBeRemoved | Pointer to the world to be removed from the world list. |
Definition at line 889 of file entresol.cpp.
This removes the world with the given name from the world list.
WorldName | The name of the world to be removed. |
Definition at line 902 of file entresol.cpp.
void Mezzanine::Entresol::SetTargetFrameRate | ( | const Whole | NewFrameRate | ) |
This sets a new Target Frame Rate.
This sets a new time for each frame. This divides 1000 by the NewFrameRate, drops and floating point amount and uses that amount in an call to Entresol::SetTargetFrameTime. For example a target frame rate of 40 with cause each frame to take 25 milliseconds, and a Framerate of 70 would take 14 ms
NewFrameRate | The new desired frame rate. |
Definition at line 597 of file entresol.cpp.
void Mezzanine::Entresol::SetTargetFrameTimeMicroseconds | ( | const Whole | NewTargetTime | ) |
This sets a new target time microseconds.
This sets a new time for each frame. Each iteration of the game loop will take around this long to run, but rarely exactly this long. Setting this value Higher can results in power savings (battery life), but setting it too High can cause choppiness. Settings this value higher can result in smoother gameplay, but set it too high, and system resources could becom completely taxed and power will be wasted.
NewTargetTime | The new length of time, in microseconds. |
Definition at line 603 of file entresol.cpp.
void Mezzanine::Entresol::SetTargetFrameTimeMilliseconds | ( | const Whole | NewTargetTime | ) |
This sets a new target time in milliseconds.
This sets a new time for each frame. Each iteration of the game loop will take around this long to run, but rarely exactly this long. Setting this value Higher can results in power savings (battery life), but setting it too High can cause choppiness. Settings this value higher can result in smoother gameplay, but set it too high, and system resources could becom completely taxed and power will be wasted.
NewTargetTime | The new length of time, in milliseconds. |
Definition at line 600 of file entresol.cpp.