Original Post
When I try to run the following lines of code I recieve a HRESULT of D3DERR_INVALIDCALL. How can I fix this?
LPDIRECT3DSURFACE9 m_pHeightData;
HRESULT hr;
m_pHeightData = NULL;
hr = CreateOffscreenPlainSurface(256,256, D3DFMT_R8G8B8, D3DPOOL_MANAGED, &m_pHeightData, NULL);