src/gl/partrenderer.h

Sat, 14 Dec 2019 22:36:06 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 14 Dec 2019 22:36:06 +0200
changeset 19
ed9685f44ab3
parent 18
918b6c0f8b5b
child 21
0133e565e072
permissions
-rw-r--r--

added missing files

#pragma once
#include <QOpenGLWidget>
#include <QOpenGLFunctions>
#include <QQuaternion>
#include "main.h"
#include "gl/common.h"

class PartRenderer : public QOpenGLWidget, protected QOpenGLFunctions
{
public:
	PartRenderer(QWidget* parent = nullptr);
protected:
	void initializeGL() override;
	void resizeGL(int width, int height) override;
	void paintGL() override;
	void mouseMoveEvent(QMouseEvent* event) override;
private slots:
	void setRenderStyle(const gl::RenderStyle newStyle);
private:
	QPointF lastMousePosition;
	bool initialized = false;
	gl::RenderStyle renderStyle = gl::RenderStyle::Normal;
	QQuaternion rotation;
	void initializeLighting();
};

mercurial