#ifndef Squircle_h_ #define Squircle_h_ #include "glm/glm.hpp" #include "SDL.h" #include "Game.hpp" #include "filesystem.hpp" class Squircle : public Game { private: enum Mode : bool { SQUIRCLE, UNSQUIRCLE }; enum Spin { NEGATIVE = -1, NONE, POSITIVE = 1 }; GLuint base_texture_shader_location = 0, base_texture_id = 0, flat_program = 0, unmapped_vao = 0, mapped_vao = 0, mode_uniform_location = 0, transformation_uniform_location = 0; int circle_vertices_count = 0, image_index = 0; Mode mode = Mode::SQUIRCLE; glm::mat4 transformation = glm::mat4(1.0f); Spin spin_z = Spin::NONE, spin_x = Spin::NONE; typedef Game super; void load_gl_context(); GLuint load_file_into_texture(fs::path) const; void load_image_index(int); void update(); public: Squircle(); void respond(SDL_Event&); }; #endif