Project

General

Profile

« Previous | Next » 

Revision 881652a7

Added by Leszek Koltunski over 7 years ago

Some fixes for the recent API change

View differences:

src/main/java/org/distorted/library/DistortedObject.java
71 71
  private boolean matrixCloned, vertexCloned, fragmentCloned;
72 72
  private long mID;
73 73
  private int mSizeX, mSizeY, mSizeZ; // in screen space
74
  private int mHalfX, mHalfY, mHalfZ; // halfs of the above
74
  private float mHalfX, mHalfY, mHalfZ; // halfs of the above
75 75

  
76 76
  private Bitmap[] mBmp= null; //
77 77
  int[] mTextureDataH;         // have to be shared among all the cloned Objects
......
99 99

  
100 100
  private void initializeData(int x, int y, int z)
101 101
    {
102
    mSizeX= x; mHalfX = x/2;
103
    mSizeY= y; mHalfY = y/2;
104
    mSizeZ= z; mHalfZ = z/2;
102
    mSizeX= x; mHalfX = x/2.0f;
103
    mSizeY= y; mHalfY = y/2.0f;
104
    mSizeZ= z; mHalfZ = z/2.0f;
105 105

  
106 106
    mID = mNextID++;
107 107
    mObjects.put(mID,this);
......
368 368
  public void setTexture(Bitmap bmp)
369 369
    {
370 370
    mBitmapSet[0] = true;
371

  
371
/*
372 372
    mSizeX= bmp.getWidth() ; mHalfX = mSizeX/2;
373 373
    mSizeY= bmp.getHeight(); mHalfY = mSizeY/2;
374

  
374
*/
375 375
    if( Distorted.isInitialized() )
376 376
      {
377 377
      GLES20.glActiveTexture(GLES20.GL_TEXTURE0);

Also available in: Unified diff