Project

General

Profile

« Previous | Next » 

Revision 71887484

Added by Leszek Koltunski almost 8 years ago

abstract setMax and getMax to EffectQueue.

View differences:

src/main/java/org/distorted/library/EffectQueueVertex.java
18 18
    { 
19 19
    super(obj,NUM_UNIFORMS,INDEX);
20 20
    }
21
  
22
///////////////////////////////////////////////////////////////////////////////////////////////////
23
// Only max Byte.MAX_VALUE concurrent effects per bitmap.
24
// If you want more, change type of the mNumEffects, mIDIndex and mFreeIndexes variables to shorts.
25
  
26
  static boolean setMax(int m)
27
    {
28
    if( (mCreated==false && !Distorted.isInitialized()) || m<=mMax[INDEX] )
29
      {
30
           if( m<0              ) m = 0;
31
      else if( m>Byte.MAX_VALUE ) m = Byte.MAX_VALUE;
32
      
33
      mMax[INDEX] = m;
34
      return true;
35
      }
36
   
37
    return false;
38
    }
39
 
40
///////////////////////////////////////////////////////////////////////////////////////////////////
41

  
42
  static int getMax()
43
    {
44
    return mMax[INDEX];
45
    }
46 21

  
47 22
///////////////////////////////////////////////////////////////////////////////////////////////////
48 23

  

Also available in: Unified diff