MPMA Framework 0.4
Classes | Namespaces | Enumerations | Functions | Variables
GFXSetup.h File Reference

Window system and OpenGL setup. More...

Go to the source code of this file.

Classes

struct  GFX::ScreenSize
 Represents a the size of a window or screen. More...
struct  GFX::GraphicsSetup
 Represents the state of graphics system and its related window. Everything in here can be both changed or read from. More...

Namespaces

namespace  GFX
 

Graphics.


Enumerations

enum  GFX::SetupWindowFlags { GFX::LEAVE_FULLSCREEN_USE_ORIGINAL_SIZE = 1 }
 Flags that can be passed to SetupWindow. More...

Functions

bool GFX::SetupWindow (const GraphicsSetup &newDesiredState, uint32 setupWindowFlags=DEFAULT_SETUPWINDOW_FLAGS)
 Creates or updates the state of the applications window and sets up OpenGL. Returns true if changing to the specified settings was successful, false if it failed. This must be called at least once before OpenGL can be used. Only the thread that called this to create the window may make OpenGL calls.
void GFX::ShutdownWindow ()
 Closes the window and shuts down the graphics system. This must be called from the same thread that called SetupWindow to create the initial window.
const GraphicsSetup * GFX::GetWindowState ()
 Retrieves the current state of the window, or 0 if the window has been closed.
void GFX::UpdateWindow ()
 Handles any window system events, and exposes the backbuffer. You should normally call this every frame. You should check GetWindowState after calling this to verify that the window still exists. This must be called from the same thread that called SetupWindow to create the initial window.
bool GFX::WindowHasFocus ()
 Returns whether the window currently has the user's focus.
ScreenSize GFX::GetCurrentScreenSize ()
 Returns the resolution of the current screen. This may only called if a window created.

Variables

const uint32 GFX::DEFAULT_SETUPWINDOW_FLAGS = LEAVE_FULLSCREEN_USE_ORIGINAL_SIZE
 Default flags for SetupWindow.

Detailed Description

Window system and OpenGL setup.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends