tec.imp Posted May 19, 2010 Share Posted May 19, 2010 Hey there, I've got a problem regarding the function CreateTexture in 2.31 and the later use of the all new created texture object. Here's what I do (pseudo code): myTexture = CreateTexture(256, 64, TEXTURE_RGBA); BindTexture(myTexture, 0); <1. render stuff and flip> UpdateWorld(); BindTexture(myTexture, 0); // <- crash <2. render stuff and flip> As you can see, this is nothing fancy. I create a new texture object, bind it, render some stuff, see it on screen, update the world and render some more stuff. You may say that the texture is empty. Well it is but that's only for testing purpose and shouldn't cause any problems now, should it? Well, wrong. It crashes on me within the second render part. Apparently, the pointer/handle/whatever to the texture object is now invalid and the engine will crash. However this behaviour isn't true for textures being loaded from file. Wth?! If I remove the UpdateWorld() call everything is just peachy. I do suspect the BlitzMax Garbage Collector of being overeagerly doing its work. Seriously, what's going on here? Josh, maybe? Mfg Imp 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.