VizKit  3.0
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
VizKit::VisualGraphicsCore Class Reference

#include <VisualGraphicsCore.h>

List of all members.

Public Member Functions

bool setupContext ()
void cleanupContext ()
uint16 setCurrentContext (void)
void setPlatformView (VISUAL_PLATFORM_VIEW aView)
const VISUAL_PLATFORM_VIEW getPlatformView (void)
void refreshCanvasRect (void)
PixelRect getCanvasRect (void)
void finishGLDrawing ()

Static Public Member Functions

static VisualGraphicsCoregetInstance (void)
static void dispose (void)

Private Member Functions

 VisualGraphicsCore ()
 ~VisualGraphicsCore ()
 VisualGraphicsCore (const VisualGraphicsCore &other)
VisualGraphicsCoreoperator= (const VisualGraphicsCore &other)

Private Attributes

VISUAL_PLATFORM_VIEW platformView
PixelRect canvasRect

Static Private Attributes

static VisualGraphicsCoretheVisualGraphicsCore = NULL

Detailed Description

The platform specific core operations of the graphics layer are bundled with this class. VisualGraphics is the only class that accesses VisualGraphicsCore. VisualGraphicsCore is a singleton class.


Constructor & Destructor Documentation

The constructor. VisualGraphicsCore is a singleton class. The constructor is private. New instance of class can only be created internally.

The destructor. VisualGraphicsCore is a singleton class. The destructor is private. Instance of class can only be deleted internally.

Copy constructor.

Parameters:
otherAnother VisualGraphicsCore.
Remarks:
Explicitely declared in private section and not implemented to enforce uniqueness of singleton pattern.

Member Function Documentation

Cleans up the OpenGL graphics context.

void VisualGraphicsCore::dispose ( void  ) [static]

Cleans up the Visual Graphics Core singleton class.

Ends the GL drawing by flushing, finishing and swaping the buffer content. Every executed drawing command should show its result on screen. The function is called at the end of each RenderMessage.

Returns the current dimensions of the canvas.

Returns:
The current dimensions of the canvas.

Returns a pointer to the instance. Initializes the Visual Graphics Core class if neccessary. The visual graphics core class is of singleton type.

Returns:
A pointer to the initialized VisualGraphicsCore.

Returns the platform specific view for rendering.

Returns:
The platform specific view for rendering.
Remarks:
On Mac VISUAL_PLATFORM_VIEW is defined as NSView*, on Windows it is defined as HWND.
VisualGraphicsCore& VizKit::VisualGraphicsCore::operator= ( const VisualGraphicsCore other) [private]

Assignment operator.

Remarks:
Explicitely declared in private section and not implemented to enforce uniqueness of singleton pattern.

Updates the dimensions of the canvas according to the current dimensions of the platform view.

Sets the current context to the one that has been set up before with the setupContext() call.

Returns:
errNum: 0 if no error, > 0 error.
Remarks:
The context must be set back to the one set up initially with each render action in case Cover Flow did change it in the meantime.

Keeps a reference to the platform specific view for internal use.

Parameters:
aViewA platform specific view.
Remarks:
On Mac VISUAL_PLATFORM_VIEW is defined as NSView*, on Windows it is defined as HWND.

Sets up an OpenGL context of the operating system. OS windowing system and OpenGL get connected.

Returns:
true on success, false on failure.

Member Data Documentation

The canvas rect is the area to draw in, measured in pixels.

The platform specific view. On Mac it is defined as NSView*. On Windows it is defined as HWND.

VisualGraphicsCore is a singleton class. Pointer to private instance is handled internally.


The documentation for this class was generated from the following files:

Generated on Sun Mar 25 2012 14:27:44 for VizKit by doxygen 1.8.0