|
VizKit
3.0
|
#include <VisualGraphicsCore.h>
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 VisualGraphicsCore * | getInstance (void) |
| static void | dispose (void) |
Private Member Functions | |
| VisualGraphicsCore () | |
| ~VisualGraphicsCore () | |
| VisualGraphicsCore (const VisualGraphicsCore &other) | |
| VisualGraphicsCore & | operator= (const VisualGraphicsCore &other) |
Private Attributes | |
| VISUAL_PLATFORM_VIEW | platformView |
| PixelRect | canvasRect |
Static Private Attributes | |
| static VisualGraphicsCore * | theVisualGraphicsCore = NULL |
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.
| VisualGraphicsCore::VisualGraphicsCore | ( | ) | [private] |
The constructor. VisualGraphicsCore is a singleton class. The constructor is private. New instance of class can only be created internally.
| VisualGraphicsCore::~VisualGraphicsCore | ( | ) | [private] |
The destructor. VisualGraphicsCore is a singleton class. The destructor is private. Instance of class can only be deleted internally.
| VizKit::VisualGraphicsCore::VisualGraphicsCore | ( | const VisualGraphicsCore & | other | ) | [private] |
Copy constructor.
| other | Another VisualGraphicsCore. |
| void VisualGraphicsCore::cleanupContext | ( | ) |
Cleans up the OpenGL graphics context.
| void VisualGraphicsCore::dispose | ( | void | ) | [static] |
Cleans up the Visual Graphics Core singleton class.
| void VisualGraphicsCore::finishGLDrawing | ( | ) |
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.
| VisualGraphicsCore * VisualGraphicsCore::getInstance | ( | void | ) | [static] |
Returns a pointer to the instance. Initializes the Visual Graphics Core class if neccessary. The visual graphics core class is of singleton type.
| const VISUAL_PLATFORM_VIEW VisualGraphicsCore::getPlatformView | ( | void | ) |
Returns the platform specific view for rendering.
| VisualGraphicsCore& VizKit::VisualGraphicsCore::operator= | ( | const VisualGraphicsCore & | other | ) | [private] |
Assignment operator.
| void VisualGraphicsCore::refreshCanvasRect | ( | void | ) |
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.
| void VisualGraphicsCore::setPlatformView | ( | VISUAL_PLATFORM_VIEW | aView | ) |
Keeps a reference to the platform specific view for internal use.
| aView | A platform specific view. |
| bool VisualGraphicsCore::setupContext | ( | ) |
Sets up an OpenGL context of the operating system. OS windowing system and OpenGL get connected.
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 * VisualGraphicsCore::theVisualGraphicsCore = NULL [static, private] |
VisualGraphicsCore is a singleton class. Pointer to private instance is handled internally.