GPU Splatting
1.0
A deffered render that draws the surface of point cloud data.
|
A generic base class for GLFW-applications. More...
#include <GLFWApplication.h>
Inherited by Vis2Application.
Public Member Functions | |
GLFWApplication (int width, int height, int ctx_major, int ctx_minor) | |
Creates a new instance with the given parameters. More... | |
virtual void | init ()=0 |
This method will be called once before the first rendering. | |
virtual void | update ()=0 |
This method is called once per frame to update logic. | |
virtual void | render ()=0 |
This method is called once per frame to render 3d content. | |
virtual void | resize (int width, int height)=0 |
This method will be called if the size of the window changes. More... | |
virtual void | initUI ()=0 |
This method will be called once before the first rendering. | |
virtual void | renderUI ()=0 |
This method is called once per frame after the render() method to render the user interface. | |
void | run () |
This method starts the update-render-loop and returns if the window has been closed. More... | |
Protected Member Functions | |
GLFWwindow * | getWindow () |
Returns the GLFW-window-handle. | |
int | getWidth () |
Returns the width of the window. | |
int | getHeight () |
Returns the height of the window. | |
float | getFrameTime () |
Returns the duration of the last frame in seconds. | |
float | getAbsTime () |
double | getMouseX () |
Returns the X-position of the mouse in the window. | |
double | getMouseY () |
Returns the Y-position of the mouse in the window. | |
double | getMouseDx () |
Returns the difference in X-position of the mouse since last frame. | |
double | getMouseDy () |
Returns the difference in Y-position of the mouse since last frame. | |
A generic base class for GLFW-applications.
This abstract class creates a window when created and provides hooks for initializing, updating, rendering and resizeing. There are also extra hooks for a GUI. It will also provide information about the mouse-position.
GLFWApplication::GLFWApplication | ( | int | width, |
int | height, | ||
int | ctx_major, | ||
int | ctx_minor | ||
) |
Creates a new instance with the given parameters.
width | the initial width of the window |
height | the initial height of the window |
ctx_major | the requested major version of OpenGL |
ctx_minor | the requested minor version of OpenGL |
|
pure virtual |
This method will be called if the size of the window changes.
width | the new width of the window |
height | the new height of the window |
Implemented in Vis2Application.
void GLFWApplication::run | ( | ) |
This method starts the update-render-loop and returns if the window has been closed.
First the initializers init() and initUI() will be called.
In the main-loop the color and depth buffer will be cleared first, then the time of the last frame will be calculated.
Also the mousepositions receive an update and the hooks update(), render() and renderUI() will be called in that order.