Project

General

Profile

« Previous | Next » 

Revision ccf9fec5

Added by Leszek Koltunski almost 4 years ago

Read the meshes from .dmesh files (rather than compute them dynamically).
This (along with single-mesh mode) hopefully makes the rendering much faster, while keeping the time needed for Object Change low.

The only downside: this increases the size of the release APK from 6 MB to 9.6 MB.

View differences:

src/main/java/org/distorted/main/RubikPreRender.java
19 19

  
20 20
package org.distorted.main;
21 21

  
22
import android.content.Context;
22 23
import android.content.SharedPreferences;
24
import android.content.res.Resources;
23 25
import android.os.Bundle;
24 26

  
25 27
import org.distorted.dialogs.RubikDialogNewRecord;
......
102 104
    if( mOldObject!=null ) mOldObject.releaseResources();
103 105
    mOldObject = mNewObject;
104 106

  
105
    mNewObject = object.create(size, mView.getQuatCurrent(), mView.getQuatAccumulated(), moves);
107
    Context con = mView.getContext();
108
    Resources res = con.getResources();
109

  
110
    mNewObject = object.create(size, mView.getQuatCurrent(), mView.getQuatAccumulated(), moves, res);
106 111

  
107 112
    if( mNewObject!=null )
108 113
      {

Also available in: Unified diff