if (FAILED(m_pD3DDevice->CreateImageSurface(256,256,(D3DFORMAT)m_iD3DFormat, &m_pD3DSurface)))
{
return E_FAIL;
}
m_pD3DDevice is initialized ok.
i tried initialize the iD3DFormat with all three flags:
D3DLOCK_NO_DIRTY_UPDATE
D3DLOCK_NOSYSLOCK
D3DLOCK_READONLY
but it still fails..
problam with CreateImageSurface method
hi all..
i'm using one of DirectX's methods called CreateImageSurface
and for some reason it failed.
here is the code, maybe u could help me..
I just looked at an example from a book I had lying around on my desk and for the format of the surface, it is usually the same format used when creating the device. If your not sure what format you used(did not set one). Then try using this:
m_pD3DDevice->CreateImageSurface(256,256,D3DFMT_X8R8G8B8,&m_pD3DSurface);
m_pD3DDevice->CreateImageSurface(256,256,D3DFMT_X8R8G8B8,&m_pD3DSurface);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement