Demo now supports large volumes (1024x1024x1024 works nicely).

This commit is contained in:
David Williams
2009-04-08 19:18:12 +00:00
parent 97b162ee20
commit 3c5e2e6202
2 changed files with 50 additions and 9 deletions

View File

@ -4,6 +4,7 @@
#include "glew/glew.h"
#include <QGLWidget>
#include <QTimer>
#include "Volume.h"
#include "IndexedSurfacePatch.h"
@ -26,12 +27,24 @@ class OpenGLWidget : public QGLWidget
void setVolume(PolyVox::Volume<PolyVox::uint8_t>* volData);
void mouseMoveEvent(QMouseEvent* event);
void mousePressEvent(QMouseEvent* event);
void wheelEvent ( QWheelEvent * event );
protected:
void initializeGL();
void resizeGL(int w, int h);
void paintGL();
private:
QPoint m_LastFrameMousePos;
QPoint m_CurrentMousePos;
int m_xRotation;
int m_yRotation;
float m_distance;
QTimer *timer;
bool m_bUseOpenGLVertexBufferObjects;