GUInity
|
#include <GraphicsSystem.hpp>
Public Member Functions | |
GraphicsSystem (GraphicsSystem const &) | |
void | operator= (GraphicsSystem const &) |
virtual int | init (int width, int height)=0 |
virtual void | shutdown ()=0 |
virtual void | swap ()=0 |
virtual void | clear ()=0 |
virtual void | createDebugShader ()=0 |
virtual int | getScreenWidth ()=0 |
virtual int | getScreenHeight ()=0 |
virtual void | render (shared_ptr< Camera > camera, const physx::PxRenderBuffer &rb, const glm::vec4 &color)=0 |
virtual void | render (shared_ptr< Camera > camera, vector< shared_ptr< MeshRenderer >> &renderers, vector< shared_ptr< Light >> &lights)=0 |
virtual void | renderGUI (vector< shared_ptr< UIWidget >> uiWidgetVector)=0 |
virtual void | generateVertexArrays (const GLuint size, GLuint &vao)=0 |
virtual void | generateBuffer (const GLuint size, GLuint &bo, GLenum type, int dataSize, void *dataPointer, GLenum drawType)=0 |
virtual void | deleteBuffer (GLuint size, GLuint &bo)=0 |
virtual GLuint | createShader (GLenum shaderType)=0 |
virtual void | compileShader (GLuint shaderID, GLuint size, const char *dataPointer)=0 |
virtual GLuint | createShaderProgram ()=0 |
virtual void | attachAndLinkShader (GLuint ProgramID, GLuint VertexShaderID, GLuint FragmentShaderID)=0 |
virtual void | deleteShader (GLuint shaderID)=0 |
virtual GLint | getUniformLocation (GLuint programID, const char *name)=0 |
virtual shared_ptr< Texture > | getDefaultTexture ()=0 |
virtual shared_ptr< GLFWwindow > | getWindow () |
Static Public Member Functions | |
static GraphicsSystem * | getInstance () |
Protected Attributes | |
shared_ptr< GLFWwindow > | window |
shared_ptr< Shader > | debugShader |
shared_ptr< Material > | debugMaterial |
shared_ptr< Shader > | guiShader |
shared_ptr< Material > | guiMaterial |
glm::mat4 | GUIMatrix |
GraphicsSystem handles the Graphics of the Engine.
The idea behind creating an abstract class would be to allow for different Graphic API's to handle how images are drawn. For example, change from OpenGL to DirectX easily.
This is the class that knows how to draw images on the screen.
|
pure virtual |
Merge VertexShader and FragmentShader to one
Implemented in GLFWGraphicsSystem.
|
pure virtual |
Clear buffers
Implemented in GLFWGraphicsSystem.
|
pure virtual |
Compile the shader
Implemented in GLFWGraphicsSystem.
|
pure virtual |
create debug shader to display Physics information on the screen
Implemented in GLFWGraphicsSystem.
|
pure virtual |
Creates a new shader
Implemented in GLFWGraphicsSystem.
|
pure virtual |
Creates a new shader program
Implemented in GLFWGraphicsSystem.
|
pure virtual |
Release buffer
Implemented in GLFWGraphicsSystem.
|
pure virtual |
Release shader
Implemented in GLFWGraphicsSystem.
|
pure virtual |
Generates a new Buffer Array
Implemented in GLFWGraphicsSystem.
|
pure virtual |
Generates a new Vertex Array - Used for mesh vertice data
Implemented in GLFWGraphicsSystem.
|
pure virtual |
screen height Getter
Implemented in GLFWGraphicsSystem.
|
pure virtual |
screen width Getter
Implemented in GLFWGraphicsSystem.
|
pure virtual |
Gets the uniform location for a string in a shader
Implemented in GLFWGraphicsSystem.
|
inlinevirtual |
window Getter
|
pure virtual |
Initialize the system, create the window and such
Implemented in GLFWGraphicsSystem.
|
pure virtual |
Renders Physics information on screen from the camera point of view
Implemented in GLFWGraphicsSystem.
|
pure virtual |
Renders meshes on the screen from the camera point of view
Implemented in GLFWGraphicsSystem.
|
pure virtual |
Render Widgets on screen
Implemented in GLFWGraphicsSystem.
|
pure virtual |
Shutdown the system, destroy window and release any allocated memory
Implemented in GLFWGraphicsSystem.
|
pure virtual |
Swap buffers
Implemented in GLFWGraphicsSystem.
|
protected |
|
protected |
Handle to the window