Tidying up OpenGLWidget.

This commit is contained in:
David Williams 2015-02-24 23:44:04 +01:00
parent fbb7ff4728
commit 2ec29e33b7
3 changed files with 11 additions and 14 deletions

View File

@ -21,18 +21,11 @@ misrepresented as being the original software.
distribution.
*******************************************************************************/
#ifndef __BasicExample_OpenGLWidget_H__
#define __BasicExample_OpenGLWidget_H__
#include "PolyVox/Mesh.h"
#include <QOpenGLFunctions_3_1>
#ifndef __OpenGLWidget_H_A72D4D2F8E__ // Random junk as 'OpenGLWidget seems like it could be a common name.
#define __OpenGLWidget_H_A72D4D2F8E__
#include <QElapsedTimer>
#include <QGLWidget>
#include <QGLShaderProgram>
#include <QOpenGLVertexArrayObject>
#include <QOpenGLBuffer>
// This is a very basic class for getting an OpenGL example up and running with Qt5. It simply displays
// an OpenGL widget and implements an FPS-style camera as well as other very basic functionality. User
@ -97,4 +90,4 @@ private:
#include "OpenGLWidget.inl"
#endif //__BasicExample_OpenGLWidget_H__
#endif //__OpenGLWidget_H_A72D4D2F8E__

View File

@ -1,12 +1,9 @@
#include "OpenGLWidget.h"
#include <QMouseEvent>
#include <QMatrix4x4>
#include <QCoreApplication>
#include <QTimer>
using namespace PolyVox;
using namespace std;
#include <iostream>
////////////////////////////////////////////////////////////////////////////////
// Protected functions

View File

@ -26,6 +26,13 @@ distribution.
#include "OpenGLWidget.h"
#include "PolyVox/Mesh.h"
#include <QGLShaderProgram>
#include <QOpenGLBuffer>
#include <QOpenGLFunctions_3_1>
#include <QOpenGLVertexArrayObject>
// This structure holds all the data required
// to render one of our meshes through OpenGL.
struct OpenGLMeshData