Revision 74686c71
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/magic/RubikRenderer.java | ||
---|---|---|
24 | 24 |
|
25 | 25 |
import org.distorted.effect.BaseEffect; |
26 | 26 |
import org.distorted.library.effect.VertexEffectSink; |
27 |
import org.distorted.library.main.DistortedEffects; |
|
28 | 27 |
import org.distorted.library.main.DistortedLibrary; |
29 | 28 |
import org.distorted.library.main.DistortedScreen; |
30 |
import org.distorted.library.main.DistortedTexture; |
|
31 |
import org.distorted.library.mesh.MeshFlat; |
|
32 | 29 |
import org.distorted.library.message.EffectListener; |
33 | 30 |
import org.distorted.object.RubikObject; |
34 | 31 |
import org.distorted.object.RubikObjectList; |
... | ... | |
57 | 54 |
private boolean mIsSolved; |
58 | 55 |
private RubikObject mOldObject, mNewObject; |
59 | 56 |
private int mScreenWidth, mScreenHeight; |
60 |
private MeshFlat mMesh; |
|
61 | 57 |
private SharedPreferences mPreferences; |
62 | 58 |
|
63 | 59 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
86 | 82 |
mCanUI = true; |
87 | 83 |
|
88 | 84 |
mEffectID = new long[BaseEffect.Type.LENGTH]; |
89 |
|
|
90 |
mMesh= new MeshFlat(20,20); |
|
91 | 85 |
} |
92 | 86 |
|
93 | 87 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
99 | 93 |
if( mOldObject!=null ) mOldObject.releaseResources(); |
100 | 94 |
mOldObject = mNewObject; |
101 | 95 |
|
102 |
DistortedTexture texture = new DistortedTexture(TEXTURE_SIZE,TEXTURE_SIZE); |
|
103 |
DistortedEffects effects = new DistortedEffects(); |
|
104 |
|
|
105 |
mNewObject = object.create(mView.getQuatCurrent(), mView.getQuatAccumulated(), texture, mMesh, effects); |
|
96 |
mNewObject = object.create(mView.getQuatCurrent(), mView.getQuatAccumulated()); |
|
106 | 97 |
mNewObject.createTexture(); |
107 | 98 |
mView.setMovement(object.getObjectMovementClass()); |
108 | 99 |
|
Also available in: Unified diff
Small improvement.