Skip to content

Commit

Permalink
Gears*: Clarify frustum calculation for tiling
Browse files Browse the repository at this point in the history
  • Loading branch information
sgothel committed Sep 10, 2013
1 parent 597ca0e commit d2be196
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -287,9 +287,9 @@ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height
final float w = right - left;
final float h = top - bottom;
final float l = left + tileX * w / imageWidth;
final float r = l + w * tileWidth / imageWidth;
final float r = l + tileWidth * w / imageWidth;
final float b = bottom + tileY * h / imageHeight;
final float t = b + h * tileHeight / imageHeight;
final float t = b + tileHeight * h / imageHeight;

final float _w = r - l;
final float _h = t - b;
Expand Down
Expand Up @@ -203,9 +203,9 @@ public void reshape(GL2 gl, int x, int y, int width, int height) {
final float w = right - left;
final float h = top - bottom;
final float l = left + tileX * w / imageWidth;
final float r = l + w * tileWidth / imageWidth;
final float r = l + tileWidth * w / imageWidth;
final float b = bottom + tileY * h / imageHeight;
final float t = b + h * tileHeight / imageHeight;
final float t = b + tileHeight * h / imageHeight;

final float _w = r - l;
final float _h = t - b;
Expand Down

0 comments on commit d2be196

Please sign in to comment.