![]() |
Pixel Dust Game Engine
v0.9.5
|
Classes | |
struct | ScreenMode |
Public Types | |
enum | { screenNum_PrimaryScreen = -1, screenNum_BestFitScreen = -2 } |
Public Member Functions | |
virtual int | getNumScreens () |
returns the number of screens available for display | |
virtual ScreenMode | getCurrentScreenMode (int screenNum=screenNum_PrimaryScreen, pdg::Rect *maxWindowRect=0) |
virtual int | getNumSupportedScreenModes (int screenNum=screenNum_PrimaryScreen) |
returns the number of screens modes a particular screen supports | |
virtual ScreenMode | getNthSupportedScreenMode (int n, int screenNum=screenNum_PrimaryScreen) |
returns the details of a supported mode (width, height, depth) for a given screen | |
virtual void | setScreenMode (long width, long height, int screenNum=screenNum_PrimaryScreen, int bpp=0) |
virtual Port * | createWindowPort (const Rect &rect, const char *windName=0, int bpp=0) |
virtual Port * | createFullScreenPort (const Rect &rect, int screenNum=screenNum_PrimaryScreen, bool allowResChange=true, int bpp=0) |
virtual void | closeGraphicsPort (Port *port=0) |
virtual Font * | createFont (const char *fontName, float scalingFactor=1.0f) |
create a font | |
virtual Port * | getMainPort () |
this is the main window port, or the full screen port if in full screen | |
virtual void | setMainPort (Port *port) |
virtual bool | switchToFullScreenMode (bool allowResChange=false, Port *port=0) |
virtual bool | switchToWindowMode (Port *port=0, const char *windName=0) |
returns true if succeeded, false if failed | |
virtual bool | inFullScreenMode () |
return true if main port is in fullscreen mode | |
virtual float | getFPS () |
return the current average frames per second | |
virtual void | setTargetFPS (float fps) |
set the desired frames per second | |
virtual float | getTargetFPS () |
return the current desired frames per second | |
virtual Point | getMouse (int mouseNumber=0) |
![]() | |
Singleton () | |
virtual | ~Singleton () |
Friends | |
class | Singleton< GraphicsManager > |
Additional Inherited Members | |
![]() | |
static GraphicsManager * | getSingletonInstance () |
static bool | hasInstance () |
static GraphicsManager & | instance () |
static void | setInstance (GraphicsManager *i) |
static GraphicsManager * | createSingletonInstance () |
Graphics Manager Used to create and track ports
|
virtual |
close a port and clean it up if port is not passed it will default to the main port, which will trigger the application to quit
|
virtual |
create a font
|
virtual |
create a full screen graphics port. desired screen resolution is in rect, desired screen color depth is in if allowResChange is true, the screen resolution will be changed to the closest possible resolution, and any excess screen real estate will be erased to black if bpp is non-zero and doesn't match the current screen settings, then the screen depth will be changed to match, even if allowResChange is false
|
virtual |
create a port for drawing in a Window. The Window's size and location are given by the rectangle passed in. bpp is the bits per pixel used for the back buffer of the window. Use bpp of zero (0) to match current screen color depth settings
|
virtual |
returns the current mode (width, height, depth) of a screen if a Rect* is passed in, will also return the maximum dimensions for a window that fits on that screen after discounting menu bars, docks, window frames, etc...
|
virtual |
return the current average frames per second
|
virtual |
this is the main window port, or the full screen port if in full screen
|
virtual |
|
virtual |
returns the details of a supported mode (width, height, depth) for a given screen
|
virtual |
returns the number of screens available for display
|
virtual |
returns the number of screens modes a particular screen supports
|
virtual |
return the current desired frames per second
|
virtual |
return true if main port is in fullscreen mode
|
virtual |
application developers should rarely, if ever, need to call this. it is primarily included for cases were someone wants to use the graphics layer but nothing else you might also use this before closing the old main port if you are replacing it with a new one, that will avoid triggering the app to quit
|
virtual |
set the display mode for a particular screen resulting mode might not be exactly what you asked for, but could instead be the closest viable mode for that screen
|
virtual |
set the desired frames per second
|
virtual |
make a port be fullscreen if port is not passed it will default to the main port if allowResChange is true, the screen resolution will be changed to the closest possible resolution, and any excess screen real estate will be erased to black returns true if succeeded, false if failed
|
virtual |
returns true if succeeded, false if failed
make a port be in a window if port is not passed it will default to the main port
|
friend |