draw.h

Sat, 16 Mar 2013 17:50:13 +0200

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Sat, 16 Mar 2013 17:50:13 +0200
changeset 22
335e430a6b4f
parent 0
c51cce84a9ac
permissions
-rw-r--r--

So much for that pointer class, caused more problems than it solved. For instance splitting a second quad after a first one had been split would trigger a peculiar crash...

#ifndef __REND_H__
#define __REND_H__

#include <QGLWidget>
#include "common.h"
#include "ldtypes.h"

class renderer : public QGLWidget {
	Q_OBJECT
	
public:
	renderer(QWidget* parent = NULL);
	void hardRefresh ();
	void CompileObjects ();
	double fRotX, fRotY, fRotZ;
	QPoint lastPos;
	double fZoom;

protected:
	void initializeGL ();
	void resizeGL (int w, int h);
	void paintGL ();
	
	void mouseMoveEvent (QMouseEvent *event);

private:
	GLuint objlist;
	void CompileOneObject (LDObject* obj);
	void ClampAngle (double& fAngle);
};

#endif

mercurial