TGEA 1.8.1: (Texture profiles) KeepBitmap and Dynamic = Crash
by Stefan Lundmark · in Torque Game Engine Advanced · 02/28/2009 (7:03 am) · 5 replies
If you set a texture to be dynamic while also keeping the bitmap, you'll run into an assert when resetting the device. The surface which is passed when rebuilding the texture turns out to be invalid.
Taking away the KeepBitmap flag, and keeping a GBitmap object outside of the texture that is used to rebuild the texture upon reset, works. Should be the same with KeepBitmap, unless I'm misunderstanding how it works. :)
(To test, head into gFont and change the Static flag to Dynamic - resize the Window ingame and whoala)
Taking away the KeepBitmap flag, and keeping a GBitmap object outside of the texture that is used to rebuild the texture upon reset, works. Should be the same with KeepBitmap, unless I'm misunderstanding how it works. :)
(To test, head into gFont and change the Static flag to Dynamic - resize the Window ingame and whoala)
About the author
#2
In our case, it was used for a terrain painter. If you don't paint anything, I can't see why it would have to change every frame. I'm probably misunderstanding the intended use of it, no problem.
03/08/2009 (1:05 am)
I'm not saying it should be either way, just that passing both of these params crashes the game simulation. ;-) And the otherwise verbose comments in the section about profile flags didn't mention it.In our case, it was used for a terrain painter. If you don't paint anything, I can't see why it would have to change every frame. I'm probably misunderstanding the intended use of it, no problem.
#3
"keeping a GBitmap object outside of the texture that is used to rebuild the texture upon reset"
How do you rebuild the texture?
I have a GBitmap that I update, but I don't know how to get it into the existing texture object. Even if I use keepBitmap, the bitmap pointer in the texture object will no longer point to my GBitmap.
This is so much easier in Delta3d, Ogre3d, etc, etc... cmon Torque. You cost money, you should be easier to use.
01/26/2010 (4:22 pm)
Can you explain this:"keeping a GBitmap object outside of the texture that is used to rebuild the texture upon reset"
How do you rebuild the texture?
I have a GBitmap that I update, but I don't know how to get it into the existing texture object. Even if I use keepBitmap, the bitmap pointer in the texture object will no longer point to my GBitmap.
This is so much easier in Delta3d, Ogre3d, etc, etc... cmon Torque. You cost money, you should be easier to use.
#4
06/11/2010 (2:19 pm)
@#1 It is 100% a bug. Are you for real? You don't want to allocate new memory every frame just because you're changing the content of the buffer every frame!!!!!!!!
#5
06/11/2010 (2:20 pm)
@everyone including myself from January. I fixed this problem once in T3d 1.1 alpha... now it's back in t3d 1.1 beta 1. That's a pretty awesome improvement...
Associate Alex Scarborough