Project

General

Profile

« Previous | Next » 

Revision a4d59c0b

Added by Leszek Koltunski over 5 years ago

Massive: make the coordinate system agree with that of OpenGL (i.e. invert the Y axis).

View differences:

src/main/java/org/distorted/examples/wind/WindRenderer.java
105 105
   public void onSurfaceChanged(GL10 glUnused, int width, int height) 
106 106
      {
107 107
      float factor = ( (float)(width<height? width:height) )/(mObjHeight + 1.4f*mObjWidth);
108
      mMove.set( factor*mObjHeight*0.58f , factor*mObjHeight*0.08f , 0 );
108
      mMove.set( factor*mObjHeight*0.58f , height - factor*mObjHeight*1.08f , 0 );
109 109
      mScale.set(factor,factor,factor);
110 110
      mScreen.resize(width, height);
111 111
      }

Also available in: Unified diff