summaryrefslogtreecommitdiff
path: root/game/physical.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-01-18 02:08:01 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-01-18 02:08:01 +0000
commit627aa88ad2559f41d5be62d36cdbf536a97e4246 (patch)
tree0e98c2e9c39db6ecc88ecf1914af608241d7c18e /game/physical.cpp
parentHelpers can be static (diff)
downloadilt-627aa88ad2559f41d5be62d36cdbf536a97e4246.tar.bz2
ilt-627aa88ad2559f41d5be62d36cdbf536a97e4246.tar.xz
ilt-627aa88ad2559f41d5be62d36cdbf536a97e4246.zip
Factor to support worlds, objects, windows etc
Diffstat (limited to 'game/physical.cpp')
-rw-r--r--game/physical.cpp15
1 files changed, 15 insertions, 0 deletions
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 <gfx/gl/shader.h>
+
+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();
+}