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.

47 lines
773 B

3 years ago
#include <iostream>
#include "../headers/OutputWidget.h"
3 years ago
3 years ago
using std::cout, std::endl;
3 years ago
void OutputWidget::initializeGL() {
3 years ago
cout << "Initialize OpenGL" << endl;
3 years ago
initializeOpenGLFunctions();
3 years ago
3 years ago
auto format = this->format();
3 years ago
cout << "OpenGL version: " <<
3 years ago
format.majorVersion() << "." << format.minorVersion()
3 years ago
<< endl;
3 years ago
3 years ago
glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
3 years ago
}
void OutputWidget::paintGL() {
3 years ago
glClear(GL_COLOR_BUFFER_BIT);
mandelbrot.draw();
3 years ago
}
void OutputWidget::resizeGL(int w, int h) {
}
void OutputWidget::wheelEvent(QWheelEvent *e) {
}
void OutputWidget::mouseMoveEvent(QMouseEvent *e) {
}
void OutputWidget::mousePressEvent(QMouseEvent *e) {
}
void OutputWidget::mouseReleaseEvent(QMouseEvent *e) {
}
void OutputWidget::keyPressEvent(QKeyEvent *e) {
}