MPMA Framework 0.4
Classes | Enumerations | Functions | Variables
GFX Namespace Reference

Graphics. More...

Classes

class  UniformVariable
 Represents a uniform variable in a shader program. The program must be bound before any values may be set. More...
class  ShaderCode
 Represents source and compiled shader code pieces. More...
class  ShaderProgram
 Represents a shader program. More...
class  AutoBindShaderProgram
 Helper to automatically bind a shader program then unbind it when it leaves scope. More...
struct  TextureDimensions
 Represents the dimensions of a texture. More...
struct  TextureCreateParameters
 Parameters used in the creation of a texture. More...
class  TextureBase
 Base class for the other texture classes. More...
class  Texture2D
 Represents a two dimensional texture. More...
class  AutoBindTexture
 Helper to automatically bind a texture then unbind it when the scope ends. More...
struct  TextColor
 Represents a text color change. More...
class  EncodedText
 Text encoded with color information. More...
class  TextWriter
 Generates and renders a transparent texture with opaque text. More...
struct  VertexComponentFormat
 An individual vertex component's use, type, and number of elements. One or more of these are combined to make a InterleavedVertexFormat. More...
struct  InterleavedVertexFormat
 Represents the combination of vertex components. More...
class  VertexBuffer
 Represents a vertex buffer object. More...
class  AutoBindVertexBuffer
 Helper to automatically bind a vertex buffer then unbind it when the scope ends. More...
class  IndexBuffer
 Represents an index buffer object. More...
class  AutoBindIndexBuffer
 Helper to automatically bind an index buffer then unbind it when the scope ends. More...
struct  ScreenSize
 Represents a the size of a window or screen. More...
struct  GraphicsSetup
 Represents the state of graphics system and its related window. Everything in here can be both changed or read from. More...

Enumerations

enum  FontType { VARIABLE_SERIF = 0x0000, VARIABLE_SANSERIF = 0x0001 }
 Style of font. More...
enum  VertexComponentMeaning { VertexPosition, VertexNormal, VertexColor }
 What a component of a stream represents. More...
enum  SetupWindowFlags { LEAVE_FULLSCREEN_USE_ORIGINAL_SIZE = 1 }
 Flags that can be passed to SetupWindow. More...

Functions

GLsizei GetGLTypeSize (GLenum type)
 Returns the numbere of bytes needed to store a specific opengl data type.
bool IsExtensionAvailable (const std::string &name)
 Returns whether a specifically named OpenGL extension is present on the current system.
VoidFuncPtrType GetExtensionFunction (const std::string &name)
 Returns a pointer to a OpenGL extension function with a specific name, or 0 if not found.
bool 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 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 GraphicsSetupGetWindowState ()
 Retrieves the current state of the window, or 0 if the window has been closed.
void 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 WindowHasFocus ()
 Returns whether the window currently has the user's focus.
ScreenSize GetCurrentScreenSize ()
 Returns the resolution of the current screen. This may only called if a window created.
GLenum GetGLError ()
 Returns and dequeues an entry from the OpenGL error queue. Returns GL_NO_ERROR if no errors occured.
void ClearGLErrors ()
 Clears any OpenGL errors from the error queue.

Variables

const uint32 DEFAULT_SETUPWINDOW_FLAGS = LEAVE_FULLSCREEN_USE_ORIGINAL_SIZE
 Default flags for SetupWindow.
bool VerboseGLErrorsOnGet = true
 This controls whether GetGLError reports all errors to MPMA's error reporting object. Default is true.

Detailed Description

Graphics.


Enumeration Type Documentation

Style of font.

Enumerator:
VARIABLE_SERIF 

Variable width serif font.

VARIABLE_SANSERIF 

Variable width san-serif font.

Flags that can be passed to SetupWindow.

Enumerator:
LEAVE_FULLSCREEN_USE_ORIGINAL_SIZE 

When leaving fullscreen mode, this specifies that the original window size prior to entering fullscreen mode should be used rather than the values stored in newDesiredState.

What a component of a stream represents.

Enumerator:
VertexPosition 

Count must be 2, 3, or 4.

VertexNormal 

Count must be 3.

VertexColor 

Count must be 3, or 4.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends