Project

General

Profile

« Previous | Next » 

Revision 881652a7

Added by Leszek Koltunski almost 8 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);
src/main/java/org/distorted/library/EffectQueueFragment.java
114 114
  
115 115
///////////////////////////////////////////////////////////////////////////////////////////////////
116 116
  
117
  synchronized void send(int halfX, int halfY)
117
  synchronized void send(float halfX, float halfY)
118 118
    {
119 119
    GLES20.glUniform1i( mNumEffectsH, mNumEffects);
120 120

  
src/main/java/org/distorted/library/EffectQueueMatrix.java
154 154
///////////////////////////////////////////////////////////////////////////////////////////////////
155 155
// here construct the ModelView Matrix
156 156

  
157
  synchronized void send(DistortedFramebuffer df, int halfX, int halfY, int halfZ)
157
  synchronized void send(DistortedFramebuffer df, float halfX, float halfY, float halfZ)
158 158
    {
159 159
    Matrix.setIdentityM(mViewMatrix, 0);
160 160
    Matrix.translateM(mViewMatrix, 0, -df.mWidth/2, df.mHeight/2, -df.mDistance);
......
242 242
///////////////////////////////////////////////////////////////////////////////////////////////////
243 243
// here construct the ModelView Matrix, but without any effects
244 244

  
245
  synchronized void sendZero(DistortedFramebuffer df, int halfX, int halfY, int halfZ)
245
  synchronized void sendZero(DistortedFramebuffer df, float halfX, float halfY, float halfZ)
246 246
    {
247 247
    Matrix.setIdentityM(mTmpMatrix, 0);
248 248
    Matrix.translateM(mTmpMatrix, 0, halfX-df.mWidth/2, df.mHeight/2-halfY, -df.mDistance);
src/main/java/org/distorted/library/EffectQueueVertex.java
134 134
   
135 135
///////////////////////////////////////////////////////////////////////////////////////////////////
136 136

  
137
  synchronized void send(int halfX, int halfY, int halfZ)
137
  synchronized void send(float halfX, float halfY, float halfZ)
138 138
    {
139 139
    GLES20.glUniform1i( mNumEffectsH, mNumEffects);
140 140
      

Also available in: Unified diff