Bläddra i källkod

Use resolution instead of screen size

Sam Jaffe 6 år sedan
förälder
incheckning
10b566c06b
2 ändrade filer med 2 tillägg och 2 borttagningar
  1. 1 2
      graphics/src/opengl_renderer.cxx
  2. 1 0
      util/include/game/util/env.hpp

+ 1 - 2
graphics/src/opengl_renderer.cxx

@@ -54,8 +54,7 @@ opengl_renderer::~opengl_renderer() {
 void opengl_renderer::clear() {
   world_to_clip = identity;
 
-  // math::vec2i resolution = env::resolution();
-  math::vec2i resolution = env::screen_size();
+  math::vec2i resolution = env::screen_resolution();
   world_to_clip = graphics::orthogonal_view(0.f, resolution[0], 0.f,
                                             resolution[1], -1.f, 1.f);
 

+ 1 - 0
util/include/game/util/env.hpp

@@ -16,4 +16,5 @@ namespace env {
   std::string resource_file(std::string const & relative_path);
   void resize_screen(math::vec2i const & size);
   math::vec2i screen_size();
+  math::vec2i screen_resolution();
 }