// // mock_renderer.h // engine // // Created by Sam Jaffe on 6/2/19. // Copyright © 2019 Sam Jaffe. All rights reserved. // #pragma once #include "game/graphics/manager.hpp" #include "game/graphics/renderer.hpp" #include "game/graphics/shader.hpp" #include "game/graphics/shader_program.hpp" #include "game/graphics/texture.hpp" #include "game/util/identity.hpp" template inline identity cast(unsigned int id) { return *reinterpret_cast *>(&id); } struct stub_manager_impl : graphics::manager { using shader = graphics::shader; using shader_program = graphics::shader_program; using texture = graphics::texture; shader compile(graphics::shaders::type t, std::string const & s) const override { return {0, t, s}; } shader_program compile(identity f, identity v) const override { return {0, f, v}; } texture compile(graphics::textures::format, math::vec2i dims, void const *) const override { return {0, dims}; } };