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]
Bugs / Memory Leak when removing Objects from World?
« on: December 30, 2011, 11:12:12 pm »

Ive got this following mini project:
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


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)?


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

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


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

When Im 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(
10-05 00:22:33.270: INFO/jPCT-AE(23039):     at com.threed.jpct.World.draw(
10-05 00:22:33.270: INFO/jPCT-AE(23039):     at com.threed.jpct.World.draw(
10-05 00:22:33.270: INFO/jPCT-AE(23039):     at
10-05 00:22:33.270: INFO/jPCT-AE(23039):     at android.opengl.GLSurfaceView$GLThread.guardedRun(
10-05 00:22:33.270: INFO/jPCT-AE(23039):     at android.opengl.GLSurfaceView$

So Im guessing its 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());;
Object3D lookup = world.getObjectByName("" + trajectory.getId());
//TODO this is flickering
if (lookup != null) {

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

try {
    if (!stop) {


if (System.currentTimeMillis() - time >= 1000) {
    Logger.log(fps + "fps");
    fps = 0;
    time = System.currentTimeMillis();
    } else {
if (fb != null) {
    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

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

Im 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 cant 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 its exactly the other way round. Any ideas why?


Pages: [1]