Revision b6d0c697
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/main/RubikPostRender.java | ||
---|---|---|
102 | 102 |
mOldObject = mNewObject; |
103 | 103 |
|
104 | 104 |
mNewObject = object.create(size, mView.getQuatCurrent(), mView.getQuatAccumulated(), moves); |
105 |
mNewObject.createTexture(); |
|
106 |
mView.setMovement(object.getObjectMovementClass()); |
|
107 | 105 |
|
108 |
if( firstTime ) mNewObject.restorePreferences(mPreferences); |
|
109 |
|
|
110 |
if( mScreenWidth!=0 ) |
|
106 |
if( mNewObject!=null ) |
|
111 | 107 |
{ |
112 |
mNewObject.recomputeScaleFactor(mScreenWidth, mScreenHeight); |
|
113 |
} |
|
108 |
mNewObject.createTexture(); |
|
109 |
mView.setMovement(object.getObjectMovementClass()); |
|
110 |
|
|
111 |
if( firstTime ) mNewObject.restorePreferences(mPreferences); |
|
114 | 112 |
|
115 |
mIsSolved = mNewObject.isSolved(); |
|
113 |
if( mScreenWidth!=0 ) |
|
114 |
{ |
|
115 |
mNewObject.recomputeScaleFactor(mScreenWidth, mScreenHeight); |
|
116 |
} |
|
117 |
|
|
118 |
mIsSolved = mNewObject.isSolved(); |
|
119 |
} |
|
116 | 120 |
} |
117 | 121 |
|
118 | 122 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
278 | 282 |
{ |
279 | 283 |
mSetTextureMap = false; |
280 | 284 |
|
281 |
mNewObject.setTextureMap(mCubit,mFace,mNewColor); |
|
285 |
if( mNewObject!=null ) mNewObject.setTextureMap(mCubit,mFace,mNewColor);
|
|
282 | 286 |
} |
283 | 287 |
|
284 | 288 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
287 | 291 |
{ |
288 | 292 |
mResetAllTextureMaps = false; |
289 | 293 |
|
290 |
mNewObject.resetAllTextureMaps(); |
|
294 |
if( mNewObject!=null ) mNewObject.resetAllTextureMaps();
|
|
291 | 295 |
} |
292 | 296 |
|
293 | 297 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Do not crash if we are running on device which does not support OpenGL ES 3.0