www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: tinhtinhcd on August 14, 2017, 06:06:50 am

Title: how to lazyload
Post by: tinhtinhcd on August 14, 2017, 06:06:50 am
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.
Title: Re: how to lazyload
Post by: EgonOlsen on August 14, 2017, 09:50:38 pm
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.
Title: Re: how to lazyload
Post by: MichaelJPCT on August 20, 2017, 07:50:36 pm
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.
Title: Re: how to lazyload
Post by: EgonOlsen on August 20, 2017, 10:20:41 pm
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).