sdl_runtime_compiler git · main
SDL3 game for running and compiling code at runtime
C++ 72.3% C 26.2%git clone https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler.gitwget https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler/archive/sdl_runtime_compiler.tar.gzsrc/rendering/floor_surface.hpp raw
#pragma once
#include <SDL3/SDL.h>
#include "rendering/gl_renderer.hpp"
#include "utils/globals.hpp"
#include "utils/light.hpp"
namespace
Nimbin
{
class Camera;
namespace Floor
{
class Surface
{
protected:
DynArray<int> _indices;
DynArray<float> _verts;
public:
virtual void generate(float world_scale,
float floor_y,
double center_x = -0.5,
double center_y = 0.0,
double width = 3.0) = 0;
virtual void draw(GlRenderer& gl, const Camera& cam, const Light& light) const = 0;
virtual ~Surface() = default;
};
class Mandelbrot final : public Surface
{
public:
void generate(float world_scale,
float floor_y,
double center_x = -0.5,
double center_y = 0.0,
double width = 3.0) override;
void draw(GlRenderer& gl, const Camera& cam, const Light& light) const override;
};
} // namespace Floor
} // namespace Nimbin