2010-05-25 4 views

답변

1

LPDIRECT3DTEXTURE에는 multiple images of different sizes이 포함될 수 있습니다. 원하는 것을 지정해야합니다. 일반적으로 0은 원본 크기이고 다른 것은 GPU 성능을 최적화하는 데 사용되는 밉맵입니다.

D3DSURFACE_DESC surfaceDesc; 
int level = 0; //The level to get the width/height of (probably 0 if unsure) 
myTexture->GetLevelDesc(level, &surfaceDesc); 
size_t size = surfaceDesc.Width * surfaceDesc.Height;