jPCT-AE - a 3d engine for Android > Support

how to lazyload

(1/1)

tinhtinhcd:
Hi,
I have problem with performance when try to load a big file size in the screen.
I have 2 screen,
screen 1 have a button, when i click this button it will go to screen 2 to load object but it take 2-3 second to go next screen.
is there any way that i can go to the 2nd screen first and load the render for surfaceView later.

EgonOlsen:
By loading you mean "loading", i.e. reading the mesh physically from storage? If so, you don't have to do that in the render thread. You can offload it some loading thread and grab the result.

MichaelJPCT:
i think of another question:
is a Texture fully loaded from storage when Texture is constructed or when Texture is added to TextureManager? or it's not fully loaded from storage until it's requested for render?
i mean , when a Texture is constructed, it can be just a description of the image , but without loading the actual image texels.

EgonOlsen:
No, if you load it...it will be loaded. However, it will be uploaded to the GPU when the first render request for it happens (if you don't preload it).

Navigation

[0] Message Index

Go to full version