mop Posted September 18, 2015 Share Posted September 18, 2015 Hi, I have a few planes and I want to change textures on them as quickly as possible using preloaded HTMLImage Elements (same size). Initially I was disposing() and recreating Textures. That was obviously very slow. I then changed to the DynamicTexture and painted them in the corresponding 2d context. Performance got notably better but as the texturing is still my bottleneck and using the 2d canvas seems overhead to me I started creating some kind of replacable image texture: http://www.babylonjs-playground.com/#17OT80 Try playing with count (16 seems to be a good count to see performance problems ) in the bottom and exchange doImage() and doDynamic(). Would something like this be a useful addition? Are there any existing solutions which I didn't see? Would you implement that as a new texture class or would one pimp the existing texture class? Thoughts? Nabroski 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 4, 2015 Share Posted October 4, 2015 [bump] Interesting topic, Mop, and it's good to see that you are still hanging-around with us. I hope you are well. This subject is way the hell over my head, but the framework authors need to see this... and give you a decent response. This is the first PG that I've seen... using Promise, too. Nice. I remember following your composite glow thread... which was interesting but also way over my head. I learn much by reading your posts and studying your playgrounds. Thanks! Ok, texture-wrangling Gods (if there's some around)... has Mop built something viable for including in the framework, here? Looks fast to me. Smokin' fast. Thanks Mop... sorry for the slow response. Quote Link to comment Share on other sites More sharing options...
fenomas Posted October 4, 2015 Share Posted October 4, 2015 Is the number of possible textures fixed, or open-ended? I mean, is there any reason you can't use a Texture Atlas, or just preallocate all the Texture objects you're going to need? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.