Author Topic: Context recreating ATF error  (Read 279 times)

Björn Lilleike   «   on: November 02, 2017, 12:05:17 PM »
On context loss and recreation I get errors in my ATF-based Texture3D objects.

atf TypeError: Error #2007: Parameter data must be non-null.

happens somewhere between
contextEvent Texture3D.as3:0490
and uploadTexture

in result all objects lost textures and are all red

It would really be helpful to get the source codes for this debugging.

Björn Lilleike   «   Reply #1 on: November 03, 2017, 03:45:00 AM »
I replaced all Textures with png files and then it works as expected.

So it is definitely a atf problem

Ariel Nehmad   «   Reply #2 on: November 04, 2017, 12:05:50 AM »
Hi Björn,

Are you using f3d or zf3d files?

Can you check the properties?
Device3D.releaseBytes and Device3D.releaseTextureBitmaps?
When these are true, the engine will get rid of the original data to save memory, thus, when loosing the context it may not be possible to recover.

Björn Lilleike   «   Reply #3 on: November 06, 2017, 02:49:33 AM »
I load Texture3D as ATF to be shared between lots of Meshes.
The creation works as expected just in context creation it breaks.

releaseBytes and releaseTextureBitmaps are both set to false

I set both parameters to true and then at a context-recreate the scene stays completely white.

In my case, the embedded textures and textures based on png-textures are recreated correctly.
Only the atf-textures end as red rectangles.

uploadTexture gets called with a 4x4 pixel sized bitmapdata which does not happen on creation of the texture (I extended it to debug into it, but don't get to the private contextevent-handler.
« Last Edit: November 06, 2017, 03:09:16 AM by Björn Lilleike »