www.jpct.net
jPCT-AE - a 3d engine for Android => Support => Topic started by: amrish90 on January 08, 2014, 12:39:26 pm
-
I am new to JPCT-AE. I am able to load the 3D object but it is taking a lot of time. I want to show a progress dialog till the 3d object is loaded. Can anyone help me with this issue or to increase the performance.
-
Which file format are you using and how big is this model?
-
I am loading .obj format and .mtl file... The file size is approx. 3mb...
-
I am working on Augmented Reality Project. Here i need to load the 3Dobject over the camera preview. The object is taking time to load so i require a progress dialog. Can anyone help me for this..
-
You can load your objects in a new thread and meanwhile, show a blinking "Loading" message or whatever on your main thread.
So, if you had a function like that before
private void initObjects() {
// ...load your objects
}
you can add another class (even in the same source file for convenience)
class InitObject extends Thread {
public void run() {
loading=true;
// ...load your objects
loading=false;
}
and change initObjects() to
private void initObjects() {
InitObject i = new InitObject();
i.start();
}
and check for "loading" in the render thread. Something like that.
-
I am doing the same but i am not able to get progress dialog is not showing.
-
How do you do the drawing of the dialog?
-
I don't really know about the dialog thing, but if loading time in general is a problem, consider to use serialized objects instead: http://www.jpct.net/wiki/index.php/Differences_between_jPCT_and_jPCT-AE#Performance_and_memory_issues.2C_serialized_objects (http://www.jpct.net/wiki/index.php/Differences_between_jPCT_and_jPCT-AE#Performance_and_memory_issues.2C_serialized_objects)