NvPlatformContext Class Reference
Basic platform functionality interface. More...
#include <NvPlatformContext.h>
Public Member Functions | |
virtual bool | isAppRunning ()=0 |
Mainloop active query. | |
virtual void | requestExit ()=0 |
Request exit. | |
virtual bool | pollEvents (NvInputCallbacks *callbacks)=0 |
Update event system. | |
virtual bool | isContextLost ()=0 |
Context lost query. | |
virtual bool | shouldRender ()=0 |
Rendering query. | |
virtual bool | hasWindowResized ()=0 |
Window resize query. | |
virtual NvGamepad * | getGamepad ()=0 |
Gamepad access. | |
virtual void | setAppTitle (const char *title)=0 |
Set app title. | |
virtual const std::vector < const char * > & | getCommandLine ()=0 |
Command-line option access. |
Detailed Description
Basic platform functionality interface.Interface class representing basic platform functionalities. This is merely the interface; the application framework must implement the platform-dependent functionalities along with a method of retrieving an instance
Member Function Documentation
virtual const std::vector<const char*>& NvPlatformContext::getCommandLine | ( | ) | [pure virtual] |
Command-line option access.
- Returns:
- a vector of strings. Each element in the vector is an item in the command line that was seperated by whitespace. The elements are provided in the order they appeared in the command line. The application executable name is NOT the first element. Only the options are included.
virtual NvGamepad* NvPlatformContext::getGamepad | ( | ) | [pure virtual] |
Gamepad access.
Returns the gamepad class instance if available
- Returns:
- a pointer to the platform's gamepad implementation, or NULL if there is no gamepad support
virtual bool NvPlatformContext::hasWindowResized | ( | ) | [pure virtual] |
Window resize query.
Returns whether the application's window has resized since the last call to this query
- Returns:
- true if the window has been resized and false if not
virtual bool NvPlatformContext::isAppRunning | ( | ) | [pure virtual] |
Mainloop active query.
Query to determine if the application should continue to parse events, or can return from its mainloop.
- Returns:
- true if the app must continue processing events via pollEvents, false if the application can exit its mainloop and return from its "main" function
virtual bool NvPlatformContext::isContextLost | ( | ) | [pure virtual] |
Context lost query.
Returns whether the application's graphics context has been "lost" (i.e. all existing graphics resources have been deleted and will need to be recreated before rendering again)
- Returns:
- true if the context has been lost, false if the context is intact. A false return value does not in and of itself indicate that the system is entirely ready to render. That requires the use of shouldRender
virtual bool NvPlatformContext::pollEvents | ( | NvInputCallbacks * | callbacks | ) | [pure virtual] |
Update event system.
Function allowing the application to pass its input callback implementation to the platform in order to process any new events.
- Parameters:
-
[in] callbacks an implementation of the input callbacks interface to be used to process any new events.
- Returns:
- true on success and false on failure. This return value does NOT indicate the presence or absence of new events.
virtual void NvPlatformContext::requestExit | ( | ) | [pure virtual] |
Request exit.
Function to allow the app to request to exit. Applications should NOT assume that they will immediately exit. Applications cannot stop processing events in their mainloop until isAppRunning returns false.
virtual void NvPlatformContext::setAppTitle | ( | const char * | title | ) | [pure virtual] |
Set app title.
Allows an application to set the title to be used by the platform and framework as needed. param[in] title a null-terminated string containing a user-readable application name
virtual bool NvPlatformContext::shouldRender | ( | ) | [pure virtual] |
Rendering query.
Returns whether the application in in a state such that it should be rendering at its normal, interactive rate (i.e. visible, focused, etc)
- Returns:
- true if the application is expected to be rendering, false if it should skip rendering at this time
The documentation for this class was generated from the following file: