29 lines
573 B
C++
29 lines
573 B
C++
#pragma once
|
|
|
|
#include <SDL2/SDL.h>
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include "utils.h"
|
|
#include "mandelbrot.h"
|
|
|
|
using namespace Util;
|
|
|
|
namespace Mandelbrot {
|
|
|
|
class Graphics {
|
|
public:
|
|
std::string title;
|
|
int w, h;
|
|
SDL_Window *window;
|
|
SDL_Renderer *renderer;
|
|
Vec2mp from;
|
|
Vec2mp to;
|
|
bool running;
|
|
|
|
Graphics(int w, int h, std::string title);
|
|
void plot(Mandelbrotc const &m);
|
|
void mainLoop();
|
|
void drawPoint(const Vec2i &pos, const rgb &col);
|
|
};
|
|
} // namespace Mandelbrot
|