From: Glenn M. <gma...@us...> - 2007-03-26 00:35:18
|
Update of /cvsroot/stepmania/stepmania/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1221 Modified Files: RageDisplay_D3D.cpp Log Message: update API Index: RageDisplay_D3D.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/RageDisplay_D3D.cpp,v retrieving revision 1.226 retrieving revision 1.227 diff -u -d -p -r1.226 -r1.227 --- RageDisplay_D3D.cpp 22 Mar 2007 18:58:19 -0000 1.226 +++ RageDisplay_D3D.cpp 26 Mar 2007 00:35:14 -0000 1.227 @@ -1407,21 +1407,16 @@ unsigned RageDisplay_D3D::CreateTexture( RageSurface* img, bool bGenerateMipMaps ) { - // texture must be power of two - ASSERT( img->w == power_of_two(img->w) ); - ASSERT( img->h == power_of_two(img->h) ); - - HRESULT hr; IDirect3DTexture8* pTex; - hr = g_pd3dDevice->CreateTexture( img->w, img->h, 1, 0, D3DFORMATS[pixfmt], D3DPOOL_MANAGED, &pTex ); + hr = g_pd3dDevice->CreateTexture( power_of_two(img->w), power_of_two(img->h), 1, 0, D3DFORMATS[pixfmt], D3DPOOL_MANAGED, &pTex ); #if defined(XBOX) while(hr == E_OUTOFMEMORY) { if(!vmem_Manager.DecommitLRU()) break; - hr = g_pd3dDevice->CreateTexture( img->w, img->h, 1, 0, D3DFORMATS[pixfmt], D3DPOOL_MANAGED, &pTex ); + hr = g_pd3dDevice->CreateTexture( power_of_two(img->w), power_of_two(img->h), 1, 0, D3DFORMATS[pixfmt], D3DPOOL_MANAGED, &pTex ); } #endif |