why cant i mipmap?(d3d7)
anyone know any articles or tutorials on mipmapping with d3d7? i cant do this..
whats wrong with this..
(im trying to fill in the mipmaps with the same bitmap)
int mp[] = {255, 128, 64, 32,16};
for (int cc = 1; cc < 3; cc++)
{
DDSCAPS2 ddsCaps;
ddsCaps.dwCaps = DDSCAPS_TEXTURE / DDSCAPS_MIPMAP;
ddsCaps.dwCaps2 = 0;
ddsCaps.dwCaps3 = 0;
ddsCaps.dwCaps4 = 0;
if( SUCCEEDED( pddsTexture->GetAttachedSurface( &ddsCaps, &pddsTexture ) ) )
pddsTexture->Release();
HDC hdcBitmap = CreateCompatibleDC( NULL );
if( NULL == hdcBitmap )
{
pddsTexture->Release();
return NULL;
}
SelectObject( hdcBitmap, hbm );
// Get a DC for the surface
HDC hdcTexture;
if( SUCCEEDED( pddsTexture->GetDC( &hdcTexture ) ) )
{
BitBlt( hdcTexture, 0, 0, mp[cc], mp[cc], hdcBitmap,
0, 0, SRCCOPY );
pddsTexture->ReleaseDC( hdcTexture );
}
DeleteDC( hdcBitmap );
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement