Skip to content
Snippets Groups Projects
Commit 37d5c8b6 authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers
Browse files

clean up headers and remove unused ones

parent 48b2f463
No related branches found
No related tags found
No related merge requests found
......@@ -189,7 +189,7 @@ namespace fggl::gfx {
// TODO(webpigeon): this shouldn't be hard-coded
constexpr glm::vec3 DEFAULT_LIGHTPOS = glm::vec3(20.0F, 20.0F, 15.0F);
void MeshRenderer::render(fggl::ecs3::World &ecs, ecs3::entity_t camera, float dt) {
void GlMeshRenderer::render(fggl::ecs3::World &ecs, ecs3::entity_t camera, float dt) {
if (camera == ecs::NULL_ENTITY) {
spdlog::warn("tried to render a scene, but no camera exists!");
return;
......
......@@ -6,6 +6,7 @@
#define FGGL_HEIGHTMAP_H
#include <cstdint>
#include "fggl/data/model.hpp"
namespace fggl::data {
......
#ifndef FGGL_GFX_COMMON_H
#define FGGL_GFX_COMMON_H
//
// This file exists to ensure that dependencies are loaded in the correct order.
// Code should NOT directly include things in this file (glfw, opengl) as the order MUST be correct or things go boom.
//
// load the correct rendering backend (only opengl for now)
#include <fggl/gfx/ogl/common.hpp>
// now it's safe to load the windowing system
#include <GLFW/glfw3.h>
#include <fggl/data/model.hpp>
#include <string>
#include <utility>
namespace fggl::gfx {
}
#endif
#ifndef FGGL_GFX_OGL_BACKEND_H
#define FGGL_GFX_OGL_BACKEND_H
#ifndef FGGL_GFX_OGL_BACKEND_HPP
#define FGGL_GFX_OGL_BACKEND_HPP
#include <fggl/gfx/ogl/common.hpp>
#include <fggl/gfx/window.hpp>
......
#ifndef FGGL_GFX_OGL_COMMON_H
#define FGGL_GFX_OGL_COMMON_H
#ifndef FGGL_GFX_OGL_COMMON_HPP
#define FGGL_GFX_OGL_COMMON_HPP
/**
* Ensure Graphics libraries are in the right order.
......
#ifndef FGGL_GFX_OGL_COMPAT_H
#define FGGL_GFX_OGL_COMPAT_H
#ifndef FGGL_GFX_OGL_COMPAT_HPP
#define FGGL_GFX_OGL_COMPAT_HPP
/**
* Legacy/Direct OpenGL calls.
*
......
......@@ -10,7 +10,6 @@
#include "fggl/gfx/ogl4/canvas.hpp"
#include <fggl/gfx/paint.hpp>
#include <fggl/gfx/renderer.hpp>
#include <memory>
#include <vector>
......@@ -71,10 +70,6 @@ namespace fggl::gfx {
using OpenGL4 = OpenGL4Backend;
// specialisation hooks
using MeshRenderer = GlMeshRenderer;
using MeshToken = GlRenderToken;
}; // namespace fggl::gfx
#endif
#include <functional>
#include <memory>
namespace fggl::gfx {
class RenderBackend {
public:
RenderBackend();
virtual ~RenderBackend() = default;
virtual void clear() = 0;
virtual void swap() = 0;
};
using RenderBackendPtr = std::unique_ptr<RenderBackend>;
using RenderBackendFactory = std::function<fggl::gfx::RenderBackendPtr &&()>;
};
#ifndef FGGL_GFX_VECTOR_H
#define FGGL_GFX_VECTOR_H
#include <fggl/math/types.hpp>
#include <vector>
namespace fggl::gfx {
struct Rectangle {
math::vec2 topLeft;
math::vec2 size;
};
struct Polygon {
std::vector<math::vec2> points;
};
}
#endif
......@@ -8,7 +8,6 @@
#include <fggl/input/input.hpp>
#include <fggl/gfx/common.hpp>
#include <fggl/math/types.hpp>
#include <fggl/gfx/input.hpp>
#include <fggl/gfx/windowing.hpp>
namespace fggl::gfx {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment