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/bean/BeanRenderer.java
104 104
    
105 105
   public void onSurfaceChanged(GL10 glUnused, int width, int height)
106 106
     {
107
     float horiRatio = (float)width / mTexture.getWidth();
108
     float vertRatio = (float)height/ mTexture.getHeight();
107
     float horiRatio = (float)width / mMesh.getStretchX();
108
     float vertRatio = (float)height/ mMesh.getStretchY();
109 109
     float factor    = horiRatio > vertRatio ? vertRatio : horiRatio;
110 110

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

Also available in: Unified diff