Jump to content

Passing textures to CubeTexture


royibernthal
 Share

Recommended Posts

Thanks.

If I understand correctly - the texture's raw data isn't cached in bjs internal caching system, is that correct?

If so, would adding a cacheRaw: boolean flag to AssetsManager/addTextureTask() be possible for you?

On the short run I can of course do what you suggested, but it'd be nice to see a cleaner solution implemented into bjs core.

Link to comment
Share on other sites

Sorry about that, I'll stop pinging you :)

So assuming I got you right - the raw data of textures related to CubeTexture is only uploaded to the GPU, and it's done only once a CubeTexture object is created with those textures for the first time.

Why not have an option to mark in assets manager textures with cacheRaw: boolean, that when set to true - will upload them to the GPU once they are loaded. No need to store on CPU side.

It'd do the exact same job as when creating a new CubeTexture instance, just without the delay and image reload.

Of course like I said, the user will be able to manually select which texture's raw data will be uploaded to the GPU once it's loaded (cacheRaw: boolean will default to false).

It's possibly a minor tweak that's not worth the work from your point of view, but assuming that's not the case, what I wrote above would be more efficient in my opinion, unless I'm misunderstanding something (which is highly possible).

Link to comment
Share on other sites

  • 1 month later...
On 31.8.2016 at 11:00 PM, royibernthal said:

It looks related but for some reason my problem persists. Would you be able to take a closer look at this isolated project I made for you?

https://www.dropbox.com/s/fqecy3ovbujjpn5/Babylon Loading Texture Test.zip?dl=1

Hello

Maybe i can help i downloaded your file, and it looks great,

what is the issue ?

 

Link to comment
Share on other sites

I don't think so, unless I'm missing something.

This previous reply of mine should help you understand the issue:

On 9/14/2016 at 0:20 AM, royibernthal said:

the raw data of textures related to CubeTexture is only uploaded to the GPU, and it's done only once a CubeTexture object is created with those textures for the first time.

Why not have an option to mark in assets manager textures with cacheRaw: boolean, that when set to true - will upload them to the GPU once they are loaded. No need to store on CPU side.

It'd do the exact same job as when creating a new CubeTexture instance, just without the delay and image reload.

Of course like I said, the user will be able to manually select which texture's raw data will be uploaded to the GPU once it's loaded (cacheRaw: boolean will default to false).

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...