JNGL
Namespaces | Functions
other.hpp File Reference
#include <sstream>
#include <string>
#include <vector>
Include dependency graph for other.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 jngl
 JNGL's main namespace.
 

Functions

bool running ()
 Returns true until the main window is closed or quit() has been called.
 
void updateInput ()
 Updates the input state. App::mainLoop() calls this before Work::step()
 
void swapBuffers ()
 Swaps back and front buffer. App::mainLoop() calls this after Work::draw()
 
void quit ()
 Emit a quit event which will exit App::mainLoop() and set running() to false.
 
void cancelQuit ()
 Undo quit() or ignore a quit event caused by the user closing the main window.
 
double getFPS ()
 
unsigned int getStepsPerSecond ()
 How many times Work::step is called per second (default: 60)
 
void setStepsPerSecond (unsigned int)
 How many times Work::step should be called per second (default: 60)
 
void readPixel (int x, int y, unsigned char &red, unsigned char &green, unsigned char &blue)
 
void setAntiAliasing (bool enabled)
 
bool getAntiAliasing ()
 
void setVerticalSync (bool enabled)
 
bool getVerticalSync ()
 
void setIcon (const std::string &filename)
 Sets the icon for the window (Desktop-only). Only works with PNG files for now.
 
void setPrefix (const std::string &path)
 
std::string getPrefix ()
 
void setConfigPath (const std::string &path)
 
std::string getConfigPath ()
 Returns the directory where to store configuration files and save games. More...
 
std::string getBinaryPath ()
 Returns the directory of the currently running binary.
 
void setArgs (std::vector< std::string >)
 
std::vector< std::stringgetArgs ()
 Returns the command line arguments passed to the executable.
 
std::stringstream readAsset (const std::string &filename)
 Returns a stringstream containing the whole file. This will read from the .apk on Android.
 
std::string readConfig (const std::string &key)
 Read in a configuration value which has been saved under key. More...
 
void writeConfig (const std::string &key, const std::string &value)
 Write value into the persistent storage which can be read in again using jngl::readConfig(key) More...