Project

General

Profile

« Previous | Next » 

Revision 34bc9f31

Added by Leszek Koltunski over 2 years ago

Generalize the max number of moving parts and max size of quat group.

View differences:

src/main/java/org/distorted/config/ConfigRenderer.java
27 27
import org.distorted.library.main.DistortedLibrary;
28 28
import org.distorted.library.main.DistortedScreen;
29 29
import org.distorted.objectlib.effects.BaseEffect;
30
import org.distorted.objectlib.main.ObjectControl;
30 31

  
31 32
import javax.microedition.khronos.egl.EGLConfig;
32 33
import javax.microedition.khronos.opengles.GL10;
......
75 76
   @Override
76 77
   public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
77 78
      {
78
      DistortedLibrary.setMax(EffectType.VERTEX,61);    // 60 Minx quaternions + rotate
79
      DistortedLibrary.setMax(EffectType.VERTEX, ObjectControl.MAX_QUATS+1);
79 80
      VertexEffectRotate.enable();
80 81
      VertexEffectQuaternion.enable();
81 82
      BaseEffect.Type.enableEffects();
src/main/java/org/distorted/main/RubikRenderer.java
128 128
   @Override
129 129
   public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
130 130
      {
131
      DistortedLibrary.setMax(EffectType.VERTEX,61);    // 60 Minx quaternions + rotate
132
      MeshBase.setMaxEffComponents(242);                // 242 moving parts (Gigaminx)
131
      DistortedLibrary.setMax(EffectType.VERTEX,ObjectControl.MAX_QUATS+1);
132
      MeshBase.setMaxEffComponents(ObjectControl.MAX_MOVING_PARTS);
133 133

  
134 134
      VertexEffectRotate.enable();
135 135
      VertexEffectQuaternion.enable();
src/main/java/org/distorted/tutorials/TutorialRenderer.java
30 30
import org.distorted.library.main.DistortedLibrary;
31 31
import org.distorted.library.main.DistortedScreen;
32 32

  
33
import org.distorted.library.mesh.MeshBase;
33 34
import org.distorted.objectlib.effects.BaseEffect;
35
import org.distorted.objectlib.main.ObjectControl;
34 36

  
35 37
///////////////////////////////////////////////////////////////////////////////////////////////////
36 38

  
......
74 76
   @Override
75 77
   public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
76 78
      {
77
      DistortedLibrary.setMax(EffectType.VERTEX,61);    // 60 Minx quaternions + rotate
79
      DistortedLibrary.setMax(EffectType.VERTEX, ObjectControl.MAX_QUATS+1);
80
      MeshBase.setMaxEffComponents(ObjectControl.MAX_MOVING_PARTS);
81

  
78 82
      VertexEffectRotate.enable();
79 83
      VertexEffectQuaternion.enable();
80 84
      BaseEffect.Type.enableEffects();

Also available in: Unified diff