aboutsummaryrefslogtreecommitdiffstats
path: root/yage/core
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-12-22 21:16:02 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-12-22 21:19:21 +0000
commitfb8197839c0bebc20fd68ee3f280da934c49c473 (patch)
treee4ccb024144cb5b41f9e572984e3278c2b0b51d0 /yage/core
parentd6b25272499352383214c738faa8ce1870df37f3 (diff)
downloadYAGE-fb8197839c0bebc20fd68ee3f280da934c49c473.tar.gz
YAGE-fb8197839c0bebc20fd68ee3f280da934c49c473.zip
Removing editor and refactoring code.
Diffstat (limited to 'yage/core')
-rw-r--r--yage/core/camera2d.cpp6
-rw-r--r--yage/core/camera2d.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/yage/core/camera2d.cpp b/yage/core/camera2d.cpp
index 89d41ab5..463dd0d2 100644
--- a/yage/core/camera2d.cpp
+++ b/yage/core/camera2d.cpp
@@ -14,14 +14,14 @@
namespace yage
{
-Camera2D::Camera2D(int screen_width, int screen_height)
+Camera::Camera(int screen_width, int screen_height)
: position_(0.f, 0.f), camera_matrix_(1.f),
ortho_matrix_(
glm::ortho(0.f, (float)screen_width, 0.f, (float)screen_height))
{
}
-void Camera2D::update(GlslProgram &program)
+void Camera::update(GlslProgram &program)
{
if (update_matrix_) {
glm::vec3 translate(-position_.x, -position_.y, 0.f);
@@ -37,7 +37,7 @@ void Camera2D::update(GlslProgram &program)
glUniformMatrix4fv(matrix_location, 1, GL_FALSE, &(camera_matrix_[0][0]));
}
-void Camera2D::move(const glm::vec2 &direction)
+void Camera::move(const glm::vec2 &direction)
{
position_ += direction;
update_matrix_ = true;
diff --git a/yage/core/camera2d.h b/yage/core/camera2d.h
index db941aee..109333d6 100644
--- a/yage/core/camera2d.h
+++ b/yage/core/camera2d.h
@@ -17,7 +17,7 @@ namespace yage
class GlslProgram;
-class Camera2D
+class Camera
{
private:
bool update_matrix_ = true;
@@ -27,7 +27,7 @@ private:
glm::mat4 ortho_matrix_;
public:
- Camera2D(int screen_width = 1280, int screen_height = 720);
+ Camera(int screen_width = 1280, int screen_height = 720);
void update(GlslProgram &program);
void move(const glm::vec2 &direction);