Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Alexey

#16
Support / Re: clear data
August 15, 2011, 09:46:49 AM
I move all textures & world initialization to Engine.onCreate, in onDestroy clear world & textures, all work good, but, i worry that if on device installed 2 different applications and some textures has equals names?  TextureManager instance will be the same for both?
#17
Support / Re: clear data
August 08, 2011, 10:14:16 PM
sorry, i dont remove removing textures code, now 6 time without crash :) . Too late, i did not realize anything now, this wallpaper make me crazy :) I will continue tomorrow
#18
Support / Re: clear data
August 08, 2011, 10:08:19 PM
in wallpaper service in oncreateEngine

texturesCreated = false;

...

if (!texturesCreated){
redCell = new Texture(BitmapHelper.rescale(BitmapHelper.convert(getResources().getDrawable(R.drawable.red_cell)), 64, 64));
blueCell = new Texture(BitmapHelper.rescale(BitmapHelper.convert(getResources().getDrawable(R.drawable.blue_cell)), 64, 64));
aNuc = new Texture(BitmapHelper.rescale(BitmapHelper.convert(getResources().getDrawable(R.drawable.nuc_a)), 64, 64));
tNuc = new Texture(BitmapHelper.rescale(BitmapHelper.convert(getResources().getDrawable(R.drawable.nuc_t)), 64, 64));
gNuc = new Texture(BitmapHelper.rescale(BitmapHelper.convert(getResources().getDrawable(R.drawable.nuc_g)), 64, 64));
cNuc = new Texture(BitmapHelper.rescale(BitmapHelper.convert(getResources().getDrawable(R.drawable.nuc_c)), 64, 64));
TextureManager.getInstance().addTexture("redCell", redCell);
TextureManager.getInstance().addTexture("blueCell", blueCell);
TextureManager.getInstance().addTexture("aNuc", aNuc);
TextureManager.getInstance().addTexture("tNuc", tNuc);
TextureManager.getInstance().addTexture("gNuc", gNuc);
TextureManager.getInstance().addTexture("cNuc", cNuc);
texturesCreated = true;
}

ERROR: Tried to set an undefined texture as default! - and because that i recreating rextures in onSurfaceCreated
#19
Support / Re: clear data
August 08, 2011, 09:58:39 PM
sorry, i don read your last replay, i try create once
#20
Support / Re: clear data
August 08, 2011, 09:56:39 PM
dont help.
if use this removing

if (fb != null) {
System.out.println("************************************ remove textures");
TextureManager tm = TextureManager.getInstance();
Set<String> names = tm.getNames();
if (names != null && !names.isEmpty()){
for (String name : names){
tm.removeAndUnload(name, fb);
}
}
fb.dispose();
fb = null;
}


first after recreate -  ERROR: A texture with the name 'redCell' has been declared twice! -  (in try{}catch)
and second, when try set - ERROR: Tried to set an undefined texture as default!
#21
Support / Re: clear data
August 08, 2011, 09:45:23 PM
... only 4 running, the same.  :'(  I try

TextureManager tm = TextureManager.getInstance();
Set<String> names = tm.getNames();
if (names != null && !names.isEmpty()){
for (String name : names){
tm.removeTexture(name);
}
}

but then, when textures remove and next create command trying set their - throw exception about textures allredy exists.
How i can clear TM singleton ?
#22
Support / Re: clear data
August 08, 2011, 09:33:11 PM
aaaaaaaaaaaaaaaaaaaaaaa, i forgot world.removeAll(); :)  , trying with it
#23
Support / Re: clear data
August 08, 2011, 09:29:10 PM
this method now used for clearing. I refactor some in object building (use clone) and now on 4th running  memory out, so objects dont removing

public void release() {
System.out.println("Clear renderer");
if (world != null) {
world.dispose();
world = null;
}
if (fb != null) {
fb.dispose();
fb = null;
}
}
#24
Support / Re: clear data
August 08, 2011, 08:56:12 PM
Now, when i go to preview wallpaper 2nd time, i have java.lang.OutOfMemoryError.

08-08 21:42:01.784: INFO/jPCT-AE(22421): OpenGL vendor:     Qualcomm
08-08 21:42:01.784: INFO/jPCT-AE(22421): OpenGL renderer:   Adreno 205
08-08 21:42:01.784: INFO/jPCT-AE(22421): OpenGL version:    OpenGL ES-CM 1.1
08-08 21:42:01.794: INFO/jPCT-AE(22421): OpenGL renderer initialized (using 2 texture stages)
08-08 21:42:01.814: INFO/jPCT-AE(22421): Subobject of object 379/object381 compiled to flat fixed point data using 384 vertices in 3ms!
08-08 21:42:01.814: INFO/jPCT-AE(22421): Object 379/object381 compiled to 1 subobjects in 12ms!
08-08 21:42:01.814: INFO/jPCT-AE(22421): Object 'object381' uses one texture set!
08-08 21:42:01.824: INFO/jPCT-AE(22421): Subobject of object 381/object383 compiled to flat fixed point data using 384 vertices in 4ms!
08-08 21:42:01.824: INFO/jPCT-AE(22421): Object 381/object383 compiled to 1 subobjects in 10ms!
08-08 21:42:01.824: INFO/jPCT-AE(22421): Object 'object383' uses one texture set!
08-08 21:42:01.824: INFO/jPCT-AE(22421): [ 1312828921830 ] - WARNING: Object object385 hasn't been build yet. Forcing build()!
08-08 21:42:01.864: INFO/jPCT-AE(22421): Subobject of object 383/object385 compiled to flat fixed point data using 4110 vertices in 5ms!
08-08 21:42:01.864: INFO/jPCT-AE(22421): Object 383/object385 compiled to 1 subobjects in 35ms!
08-08 21:42:01.864: INFO/jPCT-AE(22421): [ 1312828921866 ] - WARNING: Object object387 hasn't been build yet. Forcing build()!
08-08 21:42:01.884: INFO/jPCT-AE(22421): Subobject of object 385/object387 compiled to flat fixed point data using 3510 vertices in 5ms!
08-08 21:42:01.884: INFO/jPCT-AE(22421): Object 385/object387 compiled to 1 subobjects in 19ms!
08-08 21:42:01.884: INFO/jPCT-AE(22421): Subobject of object 387/object389 compiled to flat fixed point data using 384 vertices in 1ms!
08-08 21:42:01.884: INFO/jPCT-AE(22421): Object 387/object389 compiled to 1 subobjects in 3ms!
08-08 21:42:01.884: INFO/jPCT-AE(22421): Object 'object389' uses one texture set!
08-08 21:42:01.884: INFO/jPCT-AE(22421): Subobject of object 389/object391 compiled to flat fixed point data using 384 vertices in 1ms!
08-08 21:42:01.884: INFO/jPCT-AE(22421): Object 389/object391 compiled to 1 subobjects in 2ms!
08-08 21:42:01.884: INFO/jPCT-AE(22421): Object 'object391' uses one texture set!
08-08 21:42:01.884: INFO/jPCT-AE(22421): [ 1312828921892 ] - WARNING: Object object393 hasn't been build yet. Forcing build()!
08-08 21:42:01.894: INFO/jPCT-AE(22421): Subobject of object 391/object393 compiled to flat fixed point data using 366 vertices in 1ms!
08-08 21:42:01.894: INFO/jPCT-AE(22421): Object 391/object393 compiled to 1 subobjects in 2ms!
08-08 21:42:01.894: INFO/jPCT-AE(22421): [ 1312828921896 ] - WARNING: Object object395 hasn't been build yet. Forcing build()!
08-08 21:42:01.894: INFO/jPCT-AE(22421): Subobject of object 393/object395 compiled to flat fixed point data using 264 vertices in 1ms!
08-08 21:42:01.894: INFO/jPCT-AE(22421): Object 393/object395 compiled to 1 subobjects in 2ms!
08-08 21:42:01.894: INFO/jPCT-AE(22421): Subobject of object 395/object397 compiled to flat fixed point data using 384 vertices in 1ms!
08-08 21:42:01.894: INFO/jPCT-AE(22421): Object 395/object397 compiled to 1 subobjects in 2ms!
08-08 21:42:01.894: INFO/jPCT-AE(22421): Object 'object397' uses one texture set!
08-08 21:42:01.904: INFO/jPCT-AE(22421): Subobject of object 397/object399 compiled to flat fixed point data using 384 vertices in 1ms!
08-08 21:42:01.904: INFO/jPCT-AE(22421): Object 397/object399 compiled to 1 subobjects in 4ms!
08-08 21:42:01.904: INFO/jPCT-AE(22421): Object 'object399' uses one texture set!
08-08 21:42:01.904: INFO/jPCT-AE(22421): [ 1312828921907 ] - WARNING: Object object401 hasn't been build yet. Forcing build()!
08-08 21:42:01.924: INFO/jPCT-AE(22421): Subobject of object 399/object401 compiled to flat fixed point data using 4110 vertices in 5ms!
08-08 21:42:01.924: INFO/jPCT-AE(22421): Object 399/object401 compiled to 1 subobjects in 21ms!
08-08 21:42:01.924: INFO/jPCT-AE(22421): [ 1312828921928 ] - WARNING: Object object403 hasn't been build yet. Forcing build()!
08-08 21:42:01.944: INFO/jPCT-AE(22421): Subobject of object 401/object403 compiled to flat fixed point data using 3510 vertices in 5ms!
08-08 21:42:01.944: INFO/jPCT-AE(22421): Object 401/object403 compiled to 1 subobjects in 19ms!
08-08 21:42:01.944: INFO/jPCT-AE(22421): Subobject of object 403/object405 compiled to flat fixed point data using 384 vertices in 2ms!
08-08 21:42:01.944: INFO/jPCT-AE(22421): Object 403/object405 compiled to 1 subobjects in 3ms!
08-08 21:42:01.944: INFO/jPCT-AE(22421): Object 'object405' uses one texture set!
08-08 21:42:01.944: INFO/jPCT-AE(22421): Subobject of object 405/object407 compiled to flat fixed point data using 384 vertices in 1ms!
08-08 21:42:01.944: INFO/jPCT-AE(22421): Object 405/object407 compiled to 1 subobjects in 3ms!
08-08 21:42:01.944: INFO/jPCT-AE(22421): Object 'object407' uses one texture set!
08-08 21:42:01.944: INFO/jPCT-AE(22421): [ 1312828921954 ] - WARNING: Object object409 hasn't been build yet. Forcing build()!
08-08 21:42:01.954: INFO/jPCT-AE(22421): Subobject of object 407/object409 compiled to flat fixed point data using 366 vertices in 1ms!
08-08 21:42:01.954: INFO/jPCT-AE(22421): Object 407/object409 compiled to 1 subobjects in 2ms!
08-08 21:42:01.954: INFO/jPCT-AE(22421): [ 1312828921957 ] - WARNING: Object object411 hasn't been build yet. Forcing build()!
08-08 21:42:01.954: INFO/jPCT-AE(22421): Subobject of object 409/object411 compiled to flat fixed point data using 264 vertices in 0ms!
08-08 21:42:01.954: INFO/jPCT-AE(22421): Object 409/object411 compiled to 1 subobjects in 2ms!
08-08 21:42:01.954: INFO/jPCT-AE(22421): Subobject of object 411/object413 compiled to flat fixed point data using 384 vertices in 1ms!
08-08 21:42:01.954: INFO/jPCT-AE(22421): Object 411/object413 compiled to 1 subobjects in 2ms!
08-08 21:42:01.954: INFO/jPCT-AE(22421): Object 'object413' uses one texture set!
08-08 21:42:01.964: INFO/jPCT-AE(22421): Subobject of object 413/object415 compiled to flat fixed point data using 384 vertices in 1ms!
08-08 21:42:01.964: INFO/jPCT-AE(22421): Object 413/object415 compiled to 1 subobjects in 3ms!
08-08 21:42:01.964: INFO/jPCT-AE(22421): Object 'object415' uses one texture set!
08-08 21:42:01.964: INFO/jPCT-AE(22421): [ 1312828921966 ] - WARNING: Object object417 hasn't been build yet. Forcing build()!
08-08 21:42:01.984: INFO/jPCT-AE(22421): Subobject of object 415/object417 compiled to flat fixed point data using 4110 vertices in 6ms!
08-08 21:42:01.984: INFO/jPCT-AE(22421): Object 415/object417 compiled to 1 subobjects in 20ms!
08-08 21:42:01.984: INFO/jPCT-AE(22421): [ 1312828921987 ] - WARNING: Object object419 hasn't been build yet. Forcing build()!
08-08 21:42:01.994: INFO/jPCT-AE(22421): Subobject of object 417/object419 compiled to flat fixed point data using 3510 vertices in 4ms!
08-08 21:42:01.994: INFO/jPCT-AE(22421): Object 417/object419 compiled to 1 subobjects in 14ms!
08-08 21:42:02.004: INFO/jPCT-AE(22421): Subobject of object 419/object421 compiled to flat fixed point data using 384 vertices in 1ms!
08-08 21:42:02.004: INFO/jPCT-AE(22421): Object 419/object421 compiled to 1 subobjects in 5ms!
08-08 21:42:02.004: INFO/jPCT-AE(22421): Object 'object421' uses one texture set!
08-08 21:42:02.004: INFO/jPCT-AE(22421): Subobject of object 421/object423 compiled to flat fixed point data using 384 vertices in 1ms!
08-08 21:42:02.004: INFO/jPCT-AE(22421): Object 421/object423 compiled to 1 subobjects in 2ms!
08-08 21:42:02.004: INFO/jPCT-AE(22421): Object 'object423' uses one texture set!
08-08 21:42:02.004: INFO/jPCT-AE(22421): [ 1312828922010 ] - WARNING: Object object425 hasn't been build yet. Forcing build()!
08-08 21:42:02.004: INFO/jPCT-AE(22421): Subobject of object 423/object425 compiled to flat fixed point data using 366 vertices in 1ms!
08-08 21:42:02.004: INFO/jPCT-AE(22421): Object 423/object425 compiled to 1 subobjects in 3ms!
08-08 21:42:02.004: INFO/jPCT-AE(22421): [ 1312828922013 ] - WARNING: Object object427 hasn't been build yet. Forcing build()!
08-08 21:42:02.014: INFO/jPCT-AE(22421): Subobject of object 425/object427 compiled to flat fixed point data using 264 vertices in 2ms!
08-08 21:42:02.014: INFO/jPCT-AE(22421): Object 425/object427 compiled to 1 subobjects in 4ms!
08-08 21:42:02.014: INFO/jPCT-AE(22421): Subobject of object 427/object429 compiled to flat fixed point data using 384 vertices in 1ms!
08-08 21:42:02.014: INFO/jPCT-AE(22421): Object 427/object429 compiled to 1 subobjects in 3ms!
08-08 21:42:02.014: INFO/jPCT-AE(22421): Object 'object429' uses one texture set!
08-08 21:42:02.014: INFO/jPCT-AE(22421): Subobject of object 429/object431 compiled to flat fixed point data using 384 vertices in 1ms!
08-08 21:42:02.014: INFO/jPCT-AE(22421): Object 429/object431 compiled to 1 subobjects in 2ms!
08-08 21:42:02.014: INFO/jPCT-AE(22421): Object 'object431' uses one texture set!
08-08 21:42:02.014: INFO/jPCT-AE(22421): [ 1312828922024 ] - WARNING: Object object433 hasn't been build yet. Forcing build()!
08-08 21:42:02.034: INFO/jPCT-AE(22421): Subobject of object 431/object433 compiled to flat fixed point data using 4110 vertices in 6ms!
08-08 21:42:02.034: INFO/jPCT-AE(22421): Object 431/object433 compiled to 1 subobjects in 19ms!
08-08 21:42:02.034: INFO/jPCT-AE(22421): [ 1312828922044 ] - WARNING: Object object435 hasn't been build yet. Forcing build()!
08-08 21:42:02.054: INFO/jPCT-AE(22421): Subobject of object 433/object435 compiled to flat fixed point data using 3510 vertices in 4ms!
08-08 21:42:02.054: INFO/jPCT-AE(22421): Object 433/object435 compiled to 1 subobjects in 17ms!
08-08 21:42:02.054: INFO/jPCT-AE(22421): Subobject of object 435/object437 compiled to flat fixed point data using 384 vertices in 1ms!
08-08 21:42:02.054: INFO/jPCT-AE(22421): Object 435/object437 compiled to 1 subobjects in 2ms!
08-08 21:42:02.054: INFO/jPCT-AE(22421): Object 'object437' uses one texture set!
08-08 21:42:02.064: INFO/jPCT-AE(22421): Subobject of object 437/object439 compiled to flat fixed point data using 384 vertices in 1ms!
08-08 21:42:02.064: INFO/jPCT-AE(22421): Object 437/object439 compiled to 1 subobjects in 3ms!
08-08 21:42:02.064: INFO/jPCT-AE(22421): Object 'object439' uses one texture set!
08-08 21:42:02.064: INFO/jPCT-AE(22421): [ 1312828922068 ] - WARNING: Object object441 hasn't been build yet. Forcing build()!
08-08 21:42:02.064: INFO/jPCT-AE(22421): Subobject of object 439/object441 compiled to flat fixed point data using 366 vertices in 1ms!
08-08 21:42:02.064: INFO/jPCT-AE(22421): Object 439/object441 compiled to 1 subobjects in 3ms!
08-08 21:42:02.064: INFO/jPCT-AE(22421): [ 1312828922072 ] - WARNING: Object object443 hasn't been build yet. Forcing build()!
08-08 21:42:02.064: INFO/jPCT-AE(22421): Subobject of object 441/object443 compiled to flat fixed point data using 264 vertices in 1ms!
08-08 21:42:02.064: INFO/jPCT-AE(22421): Object 441/object443 compiled to 1 subobjects in 2ms!
08-08 21:42:02.074: INFO/jPCT-AE(22421): Subobject of object 443/object445 compiled to flat fixed point data using 384 vertices in 1ms!
08-08 21:42:02.074: INFO/jPCT-AE(22421): Object 443/object445 compiled to 1 subobjects in 3ms!
08-08 21:42:02.074: INFO/jPCT-AE(22421): Object 'object445' uses one texture set!
08-08 21:42:02.074: ERROR/dalvikvm-heap(22421): 4608-byte external allocation too large for this process.
08-08 21:42:02.074: ERROR/dalvikvm(22421): Out of memory: Heap Size=16859KB, Allocated=16593KB, Bitmap Size=8491KB, Limit=21884KB
08-08 21:42:02.074: ERROR/dalvikvm(22421): Trim info: Footprint=16967KB, Allowed Footprint=17095KB, Trimmed=1248KB
08-08 21:42:02.074: WARN/OSMemory(22421): External allocation of 4608 bytes was rejected
08-08 21:42:02.084: WARN/dalvikvm(22421): threadid=9: thread exiting with uncaught exception (group=0x40025a70)
08-08 21:42:02.094: ERROR/AndroidRuntime(22421): FATAL EXCEPTION: GLThread 12
        java.lang.OutOfMemoryError
        at org.apache.harmony.luni.platform.OSMemory.malloc(Native Method)
        at org.apache.harmony.luni.platform.PlatformAddressFactory.alloc(PlatformAddressFactory.java:150)
        at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:66)
        at java.nio.ReadWriteDirectByteBuffer.<init>(ReadWriteDirectByteBuffer.java:51)
        at java.nio.BufferFactory.newDirectByteBuffer(BufferFactory.java:93)
        at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:68)
        at com.threed.jpct.CompiledInstance.fill(CompiledInstance.java:704)
        at com.threed.jpct.Object3DCompiler.compile(Object3DCompiler.java:136)
        at com.threed.jpct.World.compile(World.java:2051)
        at com.threed.jpct.World.renderScene(World.java:1093)
        at com.ua.cv.abel.dna.wallpaper.DnaRenderer.onDrawFrame(MyRenderer.java:272)
#25
Support / Re: clear data
August 08, 2011, 11:27:41 AM
What i should destroy from jpct part in  onSurfaceDestroyed() of Engine ?
#26
Support / Re: clear data
August 08, 2011, 11:07:58 AM
ERROR/Surface(239): surface (id=0, identity=22) is invalid, err=-19 (No such device)
and black screen wallpaper
#27
Support / Re: clear data
August 08, 2011, 10:16:33 AM
I have the same problem, second run onCreateEngine() of wallpaper service crash;
Somebody can tell right initialization/destroy sequence?
I try next -


onCreateEngine()  {
       return = new MyEngine();
}
//in engine
onCreate(){
      executor = Executors.newSingleThreadExecutor();
}
onDestroy(){
  executor.shutdownNow();
  super.onDestroy();
}
onSurfaceCreated(){
      //init gl/egl
                        EGLConfig config = null;
egl = (EGL10) EGLContext.getEGL();
glDisplay = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
int[] version = new int[2];
egl.eglInitialize(glDisplay, version);
int[] configSpec = new int[]{EGL10.EGL_DEPTH_SIZE, 16, EGL10.EGL_NONE};// {EGL10.EGL_RED_SIZE, 5, EGL10.EGL_GREEN_SIZE, 6, EGL10.EGL_BLUE_SIZE, 5, EGL10.EGL_DEPTH_SIZE, 16, EGL10.EGL_NONE};
EGLConfig[] configs = new EGLConfig[1];
int[] numConfig = new int[1];
egl.eglChooseConfig(glDisplay, configSpec, configs, 1, numConfig);
config = configs[0];

glc = egl.eglCreateContext(glDisplay, config, EGL10.EGL_NO_CONTEXT, null);
glSurface = egl.eglCreateWindowSurface(glDisplay, config, holder, null);
egl.eglMakeCurrent(glDisplay, glSurface, glSurface, glc);
gl = (GL10) (glc.getGL());
//create renderer
renderer = new MyRenderer();
renderer.onSurfaceCreated(gl, config);
//in renderer.onSurfaceCreated   create word, textures objects etc
}
onSurfaceDestroyed(final SurfaceHolder holder) {
super.onSurfaceDestroyed(holder);
egl.eglMakeCurrent(glDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
egl.eglDestroySurface(glDisplay, glSurface);
egl.eglDestroyContext(glDisplay, glc);
egl.eglTerminate(glDisplay);
mVisible = false;
}
// on surfaceChange & onVisibilityChanged has only logic for call draw command in executor

#28
Bones / Re: blender2ogre -> BufferOverflowException
June 17, 2011, 01:53:00 PM
For 2.49 exporter work good.  Model was made in 2.57, when i try open it in 2.49 blender crash, so i mast use intermediate format for import model to 2.49
#29
Bones / Re: blender2ogre -> BufferOverflowException
June 17, 2011, 01:29:23 PM
I reexport model with animation, change manually vertex count again, after that found null pointer in SkinHelper.asArray(mesh.getTextureCoords().get(0).coords)  (BonesImporter.class) - 0-key value some reason was null, get(1) ... and finally i saw model on screen... but as 1 mesh without submeshes. So i hope next release will be better.
But now i solved the problem in next way - bender 2.57 -> collada .dae -> blender 2.49 (with it ogre exporter) -> create bones etc -> make animation actions/ shape keys -> export to ogre mesh  ;D
#30
Support / Re: Cube Texture Problems
June 16, 2011, 05:13:44 PM
You can use UV mapping