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

The platform specific core operations of the graphics layer are bundled with this class. More...

#include <VisualGraphicsCore.h>

List of all members.

Public Member Functions

bool setupContext ()
 Sets up an OpenGL context of the operating system.
void cleanupContext ()
 Cleans up the OpenGL graphics context.
uint16 setCurrentContext (void)
 Sets the current context to the one that has been set up before with the setupContext() call.
void setPlatformView (VISUAL_PLATFORM_VIEW aView)
 Keeps a reference to the platform specific view for internal use.
const VISUAL_PLATFORM_VIEW getPlatformView (void)
 Returns the platform specific view for rendering.
void refreshCanvasRect (void)
 Updates the dimensions of the canvas according to the current dimensions of the platform view.
PixelRect getCanvasRect (void)
 Returns the current dimensions of the canvas.
void finishGLDrawing ()
 Ends the GL drawing by flushing, finishing and swaping the buffer content.
float getScreenScaleFactor ()
 Returns the screen scale factor.

Static Public Member Functions

static VisualGraphicsCoregetInstance (void)
 Returns a pointer to the instance.
static void dispose (void)
 Cleans up the Visual Graphics Core singleton class.

Private Member Functions

 VisualGraphicsCore ()
 The constructor.
 ~VisualGraphicsCore ()
 The destructor.
 VisualGraphicsCore (const VisualGraphicsCore &other)
 Copy constructor.
VisualGraphicsCoreoperator= (const VisualGraphicsCore &other)
 Assignment operator.

Private Attributes

VISUAL_PLATFORM_VIEW platformView
 The platform specific view.
PixelRect canvasRect
 The canvas rect is the area to draw in, measured in pixels.

Static Private Attributes

static VisualGraphicsCoretheVisualGraphicsCore = NULL
 VisualGraphicsCore is a singleton class.

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.

Returns the screen scale factor.

Retina displays on the Mac have a scren scale factor of 2.0.

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 May 3 2015 20:26:32 for VizKit by doxygen 1.8.0