Dreik Posted August 20, 2018 Share Posted August 20, 2018 Hi, I encountered really weird situation with texture's property isBlocking. At start of the program everything works well but after I dispose enginge, scene...well everything and I start over and try to create texture again the property _isBlocking is always true so none of the meshes using that texture doesn't render. How does this property work, when does the engine should change this property to false ? (Texture constructor sets it to true). Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 20, 2018 Share Posted August 20, 2018 isBlocking is always true on texture expect if you manually put it to false. isBlocking is used to prevent materials to render during the download of textures. when set to true a default (0,0,0,0) texture is used while a texture download. It needs to be used pretty cautiously as the visual result might not be the one looked after. This should not impact anything with your dispose case would be cool to have more info about your repro. Quote Link to comment Share on other sites More sharing options...
Dreik Posted August 20, 2018 Author Share Posted August 20, 2018 So how can anything with diffuseTexture be ever rendered if isBlocking is always true? Look at the function here: Babylon Standard Material this will always return fals resulting in failing to render any mesh. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 20, 2018 Share Posted August 20, 2018 the function is isReadyOrNotBlocking: It either checks for the flag to render before the texture has been loaded or for the fact that the texture is ready (fully downloaded and uploaded to the gpu). This is the entire goal of isBlocking prevent to render if not ready when flagged has true. Quote Link to comment Share on other sites More sharing options...
Dreik Posted August 20, 2018 Author Share Posted August 20, 2018 So as I said if _isBlocking is set to true nothing will render right? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 20, 2018 Share Posted August 20, 2018 no, nothing renders only if the texture is not ready so during download time. Once the texture is ready everything starts rendering. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 20, 2018 Share Posted August 20, 2018 Here is what the function checks: public isReadyOrNotBlocking(): boolean { return !this.isBlocking || this.isReady(); } So either not blocking or texture being ready (meaning downloaded and uploaded to the gpu). Quote Link to comment Share on other sites More sharing options...
Dreik Posted August 20, 2018 Author Share Posted August 20, 2018 ok I fixed my bug... thanks for help 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.