Project

General

Profile

« Previous | Next » 

Revision 126393c8

Added by Leszek Koltunski about 4 years ago

Remove width & height from InternalSurface and move it to InternalOutputSurface.

View differences:

src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldRenderer.java
91 91
    
92 92
   public void onSurfaceChanged(GL10 glUnused, int width, int height) 
93 93
      {
94
      float horiRatio = (float)width / mTexture.getWidth();
95
      float vertRatio = (float)height/ mTexture.getHeight();
94
      float horiRatio = (float)width / mMesh.getStretchX();
95
      float vertRatio = (float)height/ mMesh.getStretchY();
96 96
      float factor    = horiRatio > vertRatio ? vertRatio : horiRatio;
97 97

  
98 98
      mScale.set( factor,factor,factor );

Also available in: Unified diff