From 627aa88ad2559f41d5be62d36cdbf536a97e4246 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 18 Jan 2021 02:08:01 +0000 Subject: Factor to support worlds, objects, windows etc --- game/physical.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 game/physical.cpp (limited to 'game/physical.cpp') diff --git a/game/physical.cpp b/game/physical.cpp new file mode 100644 index 0000000..f4c17d4 --- /dev/null +++ b/game/physical.cpp @@ -0,0 +1,15 @@ +#include "physical.h" +#include + +Physical::Physical(glm::vec3 where, const std::string & m, const std::string & t) : + location {where}, mesh {m}, texture {t} +{ +} + +void +Physical::render(const Shader & shader, const Camera & camera) const +{ + shader.Update(location, camera); + texture.Bind(); + mesh.Draw(); +} -- cgit v1.2.3