derive from GLKViewController

this handles resizing the view/framebuffer much better

fixes #130, #131, #133, #118
This commit is contained in:
Konstantin Käfer
2014-04-14 18:48:11 -04:00
parent 305e688a3a
commit f18aa61e33
13 changed files with 216 additions and 216 deletions

View File

@@ -34,12 +34,12 @@ void Transform::cancelAnimations() {
animations.clear();
}
void Transform::resize(uint16_t w, uint16_t h, uint16_t fb_w, uint16_t fb_h) {
void Transform::resize(uint16_t w, uint16_t h, float ratio, uint16_t fb_w, uint16_t fb_h) {
width = w;
height = h;
pixelRatio = ratio;
fb_width = fb_w;
fb_height = fb_h;
pixelRatio = (float)fb_w / (float)w;
}
void Transform::moveBy(double dx, double dy, double duration) {