aboutsummaryrefslogtreecommitdiffstats
path: root/support/magicleap/Servo2D/code
diff options
context:
space:
mode:
authorAlan Jeffrey <ajeffrey@mozilla.com>2019-08-12 17:15:35 -0500
committerAlan Jeffrey <ajeffrey@mozilla.com>2019-08-12 17:15:35 -0500
commitdb4edaee8725b1ce194cdec9c276ce4a57b5fe9a (patch)
treefab60f34ee464c7d66f9924b38f988b9638c37a2 /support/magicleap/Servo2D/code
parent4709a3061d96d661040e56b9af3035493bdc8793 (diff)
downloadservo-db4edaee8725b1ce194cdec9c276ce4a57b5fe9a.tar.gz
servo-db4edaee8725b1ce194cdec9c276ce4a57b5fe9a.zip
Make the magicleap servo2d app 16x9 rather than square
Diffstat (limited to 'support/magicleap/Servo2D/code')
-rw-r--r--support/magicleap/Servo2D/code/src/Servo2D.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/support/magicleap/Servo2D/code/src/Servo2D.cpp b/support/magicleap/Servo2D/code/src/Servo2D.cpp
index 062a6411e4e..0dd8201baf8 100644
--- a/support/magicleap/Servo2D/code/src/Servo2D.cpp
+++ b/support/magicleap/Servo2D/code/src/Servo2D.cpp
@@ -18,22 +18,22 @@
#include <string.h>
// The viewport dimensions (in px).
-const int VIEWPORT_W = 500;
-const int VIEWPORT_H = 500;
+const int VIEWPORT_W = 1280;
+const int VIEWPORT_H = 720;
// The hidpi factor.
const float HIDPI = 1.0;
// The prism dimensions (in m).
-const float PRISM_W = 0.75;
-const float PRISM_H = 0.75;
+const float PRISM_W = 1.50;
+const float PRISM_H = 1;
const float PRISM_D = 0.05;
// The length of the laser pointer (in m).
const float LASER_LENGTH = 10.0;
// The width of the keyboard
-const float KEYBOARD_W = 0.666;
+const float KEYBOARD_W = 1.333;
// The home page
const char* HOME_PAGE = "https://servo.org/ml-home";
@@ -152,7 +152,7 @@ int Servo2D::init() {
}
lumin::ui::UiPanel::RequestFocus(content_panel_);
- lumin::ResourceIDType plane_id = prism_->createPlanarEGLResourceId();
+ lumin::ResourceIDType plane_id = prism_->createPlanarEGLResourceId(VIEWPORT_W, VIEWPORT_H);
if (!plane_id) {
ML_LOG(Error, "Servo2D Failed to create EGL resource");
abort();