direct3d9 - Does direct3d initialize a newly created texture -
if create new empty texture e.g. with
idirect3ddevice9::createtexture or d3dxcreatetexture
is guaranteed filled zeros - appears me testing? have link statement microsoft this? not find anything.
no, there no stated guarantee (that i've ever seen). in fact, i've seen bit of opposite behavior: data previous (deallocated) textures , seemingly random data appearing.
however, behavior between textures differs depending on texture allocated in format. allocating in system memory or of shared pools cause data zeroed out, if cpu desires. typically, when allocating in video memory, not occur. there may differences between idirect3ddevice9::createtexture , d3dxcreatetexture; d3dx more initialization or provides options such.
if seeing texture appear zero-filled, may due debug builds or fresh system. run other graphics applications , try running release build (make sure system not set d3d debug mode).
Comments
Post a Comment