Interactive Mandelbrot viewer with Qt and OpenGL.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
434 B

3 years ago
#pragma once
#include <QVector2D>
#include <QOpenGLExtraFunctions>
#include <QOpenGLShaderProgram>
3 years ago
class Mandelbrot : public QObject, protected QOpenGLExtraFunctions {
3 years ago
Q_OBJECT
3 years ago
public:
3 years ago
void init();
void draw(GLuint, QOpenGLShaderProgram&);
3 years ago
void zoom(double);
3 years ago
public slots:
void setIterations(int);
3 years ago
private:
3 years ago
int iterations = 0;
double scale = 1;
3 years ago
QVector2D translation;
3 years ago
void setShaderValues(QOpenGLShaderProgram&) const;
3 years ago
};