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.


Topics - sticksen

Pages: [1]
1
Bugs / Memory Leak when removing Objects from World?
« on: December 30, 2011, 11:12:12 pm »
Hi,

I´ve got this following mini project: http://db.tt/aslRLtOp
In this simplistic app, every frame all objects are cleared from the world and then one new object is added. If I run it, the consumed memory continously begins to grow. Why is that?

I came across this problem because in a bigger project, I have to add around 500 Object3Ds with 400 Vertices each continously again and again, i.e. remove them from the world, add them again, remove them etc.
With every step my app consumed 50MB more of Heapsize!

Anybody with a clue?

Cheers, Marc

2
Hi,

alright, I guess this is a problem onlz occuring to me, but I just wanted to let you know:

When the scale parts of an Object3D rotation matrix are used (for some cause), billboarded objects seem to be scaled double the size it's supposed to be. Could there be an easy fix (maybe in a new release)?

Cheers,
Marc

3
Support / Scale around a center point?
« on: October 09, 2011, 03:20:19 pm »
Hi,

is there any way to scale an Object3D around some arbitrary point? As far as I can see, currently it´s always scaling around the object´s origin in (0,0,0) , so I would have to calculate something to translate it afterwards? I´m needing this for correct Pinch-Zooming.

Cheers,
Marc

4
Support / Flickering when using world.removeObject ?
« on: October 05, 2011, 12:34:38 am »
Hi there,

When I´m using world.removeObject, sometimes the screen flickers. Log shows repeatedly:

Code: [Select]
10-05 00:22:32.890: INFO/jPCT-AE(23039): Loading Texture...
10-05 00:22:33.060: INFO/jPCT-AE(23039): OpenGL vendor:     NVIDIA Corporation
10-05 00:22:33.060: INFO/jPCT-AE(23039): OpenGL renderer:   NVIDIA AP
10-05 00:22:33.060: INFO/jPCT-AE(23039): OpenGL version:    OpenGL ES-CM 1.1
10-05 00:22:33.060: INFO/jPCT-AE(23039): OpenGL renderer initialized (using 2 texture stages)
10-05 00:22:33.060: INFO/jPCT-AE(23039): Subobject of object 2/0 compiled to flat fixed point data using 24 vertices in 0ms!
10-05 00:22:33.060: INFO/jPCT-AE(23039): Static references cleared...
10-05 00:22:33.060: INFO/jPCT-AE(23039): Object 2/0 compiled to 1 subobjects in 1ms!
10-05 00:22:33.100: INFO/jPCT-AE(23039): 0fps
10-05 00:22:33.170: INFO/jPCT-AE(23039): Static references cleared...
10-05 00:22:33.180: INFO/jPCT-AE(23039): Subobject of object 6/1 compiled to flat fixed point data using 6 vertices in 0ms!
10-05 00:22:33.180: INFO/jPCT-AE(23039): Object 6/1 compiled to 1 subobjects in 2ms!
10-05 00:22:33.270: INFO/jPCT-AE(23039): Static references cleared...
10-05 00:22:33.270: INFO/jPCT-AE(23039): java.lang.NullPointerException
10-05 00:22:33.270: INFO/jPCT-AE(23039):     at com.threed.jpct.GLRenderer.drawVertexArray(GLRenderer.java:2015)
10-05 00:22:33.270: INFO/jPCT-AE(23039):     at com.threed.jpct.World.draw(World.java:1355)
10-05 00:22:33.270: INFO/jPCT-AE(23039):     at com.threed.jpct.World.draw(World.java:1136)
10-05 00:22:33.270: INFO/jPCT-AE(23039):     at myPackage.gl.MapRenderer.onDrawFrame(MapRenderer.java:186)
10-05 00:22:33.270: INFO/jPCT-AE(23039):     at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1429)
10-05 00:22:33.270: INFO/jPCT-AE(23039):     at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1184)

So I´m guessing it´s this NullPointerException that causes the flickering.

My relevant code:
Code: [Select]
//this is triggered by some external source...maybe every 100ms
Object3D traj3D = trajectory.generateObject3D();
traj3D.setName("" + trajectory.getId());
traj3D.build();
Object3D lookup = world.getObjectByName("" + trajectory.getId());
world.addObject(traj3D);
rootNode.addChild(traj3D);
//TODO this is flickering
if (lookup != null) {
    world.removeObject(lookup);
    rootNode.removeChild(lookup);
}

Code: [Select]
@Override
    public void onDrawFrame(GL10 gl) {
// Log.v(TAG, "onDrawFrame");

try {
    if (!stop) {

fb.clear(back);
world.renderScene(fb);
world.draw(fb);
fb.display();

if (System.currentTimeMillis() - time >= 1000) {
    Logger.log(fps + "fps");
    fps = 0;
    time = System.currentTimeMillis();
}
fps++;
    } else {
if (fb != null) {
    fb.dispose();
    fb = null;
}
    }
} catch (Exception e) {
    Logger.log(e, Logger.MESSAGE);
}
    }
Any guess what it could be? Any chance to get the relevant jpct code lines?

Cheers, Marc

5
Support / Problem with FOV value
« on: October 04, 2011, 02:56:52 pm »
Hi there,

I´m developing an Android app and am currently facing the problem of converting screen in world(or scene) coordinates.
Anyways, I need to know the FOV value in degrees or maybe rad for this, but all jpct gives is a (proprietary?) FOV value that I can´t decode right. What exactly is this jpct FOV value and how can I calculate it back to deg or rad?
Additionally, it confuses me that jpct assigns a FOV to the x-axis. In standard OpenGL, the y-axis is been given the FOV and the x-axis FOV is calculated from it, so it´s exactly the other way round. Any ideas why?

Cheers,
Marc

Pages: [1]