GPU Splatting  1.0
A deffered render that draws the surface of point cloud data.
GLFWApplication Class Referenceabstract

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

GLFWApplication::GLFWApplication ( int  width,
int  height,
int  ctx_major,
int  ctx_minor 
)

Creates a new instance with the given parameters.

Parameters
widththe initial width of the window
heightthe initial height of the window
ctx_majorthe requested major version of OpenGL
ctx_minorthe requested minor version of OpenGL

Member Function Documentation

virtual void GLFWApplication::resize ( int  width,
int  height 
)
pure virtual

This method will be called if the size of the window changes.

Parameters
widththe new width of the window
heightthe 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.


The documentation for this class was generated from the following files: