Module
|
#include <GraphicsInterface.hpp>
Public Member Functions | |
GraphicsInterface () | |
GraphicsInterface (unsigned int set_fps) | |
virtual Mesh * | createMesh (Vector3 *vertices, Vector3 *normals, unsigned int num_vertices, const std::string &name) |
virtual Mesh * | createMesh (const std::vector< Vector3 > &vertices, const std::vector< Vector3 > &normals, const std::string &name) |
virtual Mesh * | loadMeshFromFile (const std::string &meshname, const std::string &filename, bool flipFaces=false)=0 |
virtual void | setCamera (GameObject *obj) |
void | addGraphicsCallback (GraphicsCallback *g) |
void | addInputCallback (InputCallback *g) |
Protected Member Functions | |
void | start () |
void | run () |
void | preRender () |
void | postRender () |
void | mousePressed (uint8_t button, uint16_t x, uint16_t y) |
void | mouseReleased (uint8_t button, uint16_t x, uint16_t y) |
void | mouseMoved (uint16_t x, uint16_t y, int16_t dx, int16_t dy) |
void | keyPressed (KeyCode::Code code, char keyChar) |
void | keyReleased (KeyCode::Code code, char keyChar) |
virtual void | createWindow ()=0 |
virtual void | renderFrame ()=0 |
virtual void | swapBuffers ()=0 |
virtual unsigned long | getMilliseconds ()=0 |
virtual bool | isRunning ()=0 |
virtual void | drawPolygons2D (const PolygonContainer &polygons)=0 |
Book< float > * | getVertexBook (Mesh *m) const |
Book< float > * | getNormalBook (Mesh *m) const |
unsigned int | getVertexIndex (Mesh *m) const |
unsigned int | getNormalIndex (Mesh *m) const |
unsigned int | getNumVertices (Mesh *m) const |
Protected Attributes | |
unsigned int | fps |
ModuleGame * | game |
GameObject * | camera |
Book< float > | allVertices |
Book< float > | allNormals |
Book< Mesh > | allMeshes |
std::vector< GraphicsCallback * > | graphicsCallbacks |
std::vector< InputCallback * > | inputCallbacks |
Friends | |
class | ModuleGame |
class | GraphicsContext |
The GraphicsInterface is one of Module's four core interfaces. It manages rendering and user input. Implementations of the GraphicsInterface are responsible for drawing the world and triggering the attached graphics and input callbacks.
GraphicsInterface::GraphicsInterface | ( | ) |
GraphicsInterface::GraphicsInterface | ( | unsigned int | set_fps | ) |
void GraphicsInterface::addGraphicsCallback | ( | GraphicsCallback * | g | ) |
void GraphicsInterface::addInputCallback | ( | InputCallback * | g | ) |
|
virtual |
|
virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protectedpure virtual |
|
protected |
|
protected |
|
pure virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedpure virtual |
|
protectedvirtual |
Implements Module::ThreadObject.
|
inlinevirtual |
|
protected |
|
protectedpure virtual |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |