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 - Mr_Chaos

#1
Support / Re: Changing world and all objects
November 08, 2017, 04:40:55 PM
How do I do that ?
Currently I'm making sure I don't render anything, but is that enough or do I have to do something else when I'm adding new objects ?
#2
Support / Changing world and all objects
November 08, 2017, 08:03:17 AM
Hi.

I have an android app using JPCT-AE where the user can select different worlds, when a world is selected I want to show a progressdialog while the data is loading (data is loading asynchroniously using background tasks).
My problem is that sometimes when I change "world" I get exception, that I can see are because jpct-ae is not multi threaded, but how do I fix this.
I have a volatile variable in my renderer, that only allows rendering once the data is loaded, but for some reason i still get crashed in JPCT.
Do I have to pause the GLSurfaceView while loading or ? any ideas on how to do this
#3
Quote from: EgonOlsen on August 09, 2017, 10:28:33 AM
That's strange, because they should be in the same thread. Have you checked if they actually are? It is possible to work with different EDT's for different components (albeit that's a pain in the a... but some people won't listen...).

Or...maybe the table is sorted in the EDT, i.e. actually blocking it while doing the repaints by itself?

It's very strange, because all other swing components also still update (we have a JTextField with the current time, and it updates fine).

Any idea how I could debug it ?
#4
Quote from: EgonOlsen on August 08, 2017, 05:16:54 PM
Not really. How exactly do you define "heavy load" for the EDT?

That's a good question, we have a table (Jide) which is updated many times each second, and if we sort the table, suddenly the awtcanvas stops updating, but the Swing table still updates
#5
I have a strange problem, normally my program runs fine, but when the EDT thread in under heavy load the AWTCanvas freezes.

The SwingUI is updated, but the AWTCanvas is not.

Has anyone seen anything like this before ?


    buffer.clear(frameBufferBGColor);
    world.renderScene(buffer);
    world.draw(buffer);
   
    buffer.update();
       
    buffer.displayGLOnly();
   
   _canvas.repaint();

#6
Support / Re: Limit of moving object3D
February 15, 2015, 05:18:08 PM
Then I think that's the solution
#7
Support / Re: Limit of moving object3D
February 14, 2015, 07:02:05 PM
I could half it, by having some Object3d which will be empty carts and some Object3Ds with bags, that way I only have 25000 objects.

Could draw distance help here, so some of the objects won't be drawn each frame ?
#8
Support / Re: Limit of moving object3D
February 13, 2015, 09:19:39 PM
I have to show 25000 carts each consisting of the cart (1 object3D) and 1 item in the cars (another Object3D).

But i'm thinking if maybee I can change the view distance, so not all of the objects are visible at a time.
#9
Support / Re: Limit of moving object3D
February 13, 2015, 07:08:01 PM
:/

Could you make one large Object3D and move it's vertices manually that should make 1 drawcall, right ?
#10
Support / Limit of moving object3D
February 13, 2015, 12:43:05 PM
I was wondering if there is a limit to how many Object3D you can have, I'm looking into a requirement that might mean we have to have 50000 objects on screen at the same time, running at 30fps.
#11
Support / Required OpenGL version
February 12, 2015, 01:48:02 PM
Someone want to run a program using OpenGL om a WMWare view client.

So they want to know which version of OpenGL is required to run JPCT ?
#12
It works now, handle count is completely stable and the same is my Memory usage
#13
They are lost forever, never reclaimed.

When my program reached about 2500 handles it's using > 5GB native memory
#14
Ok, by changing it to use the IPaintListener the logs look a lot better, the problem is that I still have a handle leak.

I am using a BufferedImage to create the texture from, don't know if that might be a problem ?


********************updateElementsTexture********************
oldTexture=<com.threed.jpct.Texture@24fa5c93>
Texture 2 added for unloading (1)!
Loading Texture...from Image
newTexture=<com.threed.jpct.Texture@324895c0>
********************updateElementsTexture********************
Textures to unload: 1
Unloading texture 2
texture 2 unloaded from GPU memory!
New texture's id is: 2
New texture uploaded: com.threed.jpct.Texture@324895c0 in thread Thread[AWT-EventQueue-0,6,main]
#15
Ok, the logs helped a bit, but I cannot figure out what is wrong.

It seems that whenever i replace the texture the old texture is uploaded as well as the new one.

So the leak is that both the old and the new texture exists ... or something.

Using the taskmanager I can see the handle count increate whenever i replace the texture


Texture 2 added for unloading (1)!
Loading Texture...from Image
Textures to unload: 1
Unloading texture 2
texture 2 unloaded from GPU memory!
Allocating 4194304 bytes of direct memory for texture: com.threed.jpct.Texture@76ce21e7
Creating new disposable buffer of size 4194304
Caching 4194304 bytes of direct memory!
New texture's id is: 2
New texture uploaded: com.threed.jpct.Texture@76ce21e7 in thread Thread[AWT-EventQueue-0,6,main]
New texture's id is: 6
New texture uploaded: com.threed.jpct.Texture@51a3adb in thread Thread[AWT-EventQueue-0,6,main]
updateElementsTexture
Texture 6 added for unloading (1)!
Loading Texture...from Image
Textures to unload: 1
Unloading texture 6
texture 6 unloaded from GPU memory!
New texture's id is: 6
New texture uploaded: com.threed.jpct.Texture@51a3adb in thread Thread[AWT-EventQueue-0,6,main]
New texture's id is: 7
New texture uploaded: com.threed.jpct.Texture@66c9cfd2 in thread Thread[AWT-EventQueue-0,6,main]