NvPlatformContext Class ReferenceBasic platform functionality interface. More...
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 * > &
|Command-line option access. |
Detailed DescriptionBasic 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||(||)||
Command-line option access.
- 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||(||)||
Returns the gamepad class instance if available
- a pointer to the platform's gamepad implementation, or NULL if there is no gamepad support
|virtual bool NvPlatformContext::hasWindowResized||(||)||
Window resize query.
Returns whether the application's window has resized since the last call to this query
- true if the window has been resized and false if not
|virtual bool NvPlatformContext::isAppRunning||(||)||
Mainloop active query.
Query to determine if the application should continue to parse events, or can return from its mainloop.
- 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||(||)||
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)
- 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||)||
Update event system.
Function allowing the application to pass its input callback implementation to the platform in order to process any new events.
[in] callbacks an implementation of the input callbacks interface to be used to process any new events.
- true on success and false on failure. This return value does NOT indicate the presence or absence of new events.
|virtual void NvPlatformContext::requestExit||(||)||
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||)||
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||(||)||
Returns whether the application in in a state such that it should be rendering at its normal, interactive rate (i.e. visible, focused, etc)
- 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: