vendredi 8 août 2014

c - Direct3D9 libérant des textures - Stack Overflow


I'm working on a game engine using Direct3D 9 and I need to know how the memory management works. I know there is the Release() method, but as I have read it only decrements a reference count and in practice it crashes, like the device got destroyed. how can I notify Direct3D that a specified texture is no longer needed at runtime?

To create textures I'm using the following line:


Device->CreateTexture(width, height, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &TempTextureInterface, NULL);


thanks in advance.



I'm working on a game engine using Direct3D 9 and I need to know how the memory management works. I know there is the Release() method, but as I have read it only decrements a reference count and in practice it crashes, like the device got destroyed. how can I notify Direct3D that a specified texture is no longer needed at runtime?

To create textures I'm using the following line:


Device->CreateTexture(width, height, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &TempTextureInterface, NULL);


thanks in advance.


0 commentaires:

Enregistrer un commentaire