src/gl/partrenderer.h

Sat, 14 Dec 2019 23:00:01 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 14 Dec 2019 23:00:01 +0200
changeset 20
cef43609a374
parent 18
918b6c0f8b5b
child 21
0133e565e072
permissions
-rw-r--r--

fixed build

#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