update API
This commit is contained in:
@@ -1407,21 +1407,16 @@ unsigned RageDisplay_D3D::CreateTexture(
|
|||||||
RageSurface* img,
|
RageSurface* img,
|
||||||
bool bGenerateMipMaps )
|
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;
|
HRESULT hr;
|
||||||
IDirect3DTexture8* pTex;
|
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)
|
#if defined(XBOX)
|
||||||
while(hr == E_OUTOFMEMORY)
|
while(hr == E_OUTOFMEMORY)
|
||||||
{
|
{
|
||||||
if(!vmem_Manager.DecommitLRU())
|
if(!vmem_Manager.DecommitLRU())
|
||||||
break;
|
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
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user