Original Post
Can someone tells me why this fails?:
ddsd.dwSize = sizeof( ddsd );
ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
ddsd.dwWidth = usWidth;
ddsd.dwHeight = usHeight;
ZeroMemory( &ddsd.ddpfPixelFormat, sizeof( DDPIXELFORMAT ) );
ddsd.ddpfPixelFormat.dwSize = sizeof( DDPIXELFORMAT );
ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB;
ddsd.ddpfPixelFormat.dwRGBBitCount = usBitDepth;
hr = m_pDD4->CreateSurface( &ddsd, &m_pDDS, NULL );
thanks in advance
