Hi, Quick poll: What should happen if you try CreateSurface(GDSURFACE_VIDEOMEMORY, ...) and it does not succeed? Possible causes are:
(1) The program is run on a PDA that does not have video acceleration
(2) The program runs on a Stationary PC with limited video memory
Feel free to post any comments on the issue..
The first option (the D3D way), generally results in code like this (taken from http://www.infinitecode.com/t3b3srctxt.html ):
Also note that all CreateSurface(GDSURFACE_VIDEOMEMORY, ...) automatically will fail on all current PocketPCs since they have no hw acceleration.
(1) The program is run on a PDA that does not have video acceleration
(2) The program runs on a Stationary PC with limited video memory
Feel free to post any comments on the issue..
The first option (the D3D way), generally results in code like this (taken from http://www.infinitecode.com/t3b3srctxt.html ):
- Code:
dxsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY;
if(dxdd->CreateSurface(&dxsd, &dxstexture[j*8+i], NULL)!=D3D_OK){
dxsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY;
if(dxdd->CreateSurface(&dxsd, &dxstexture[j*8+1], NULL)!=D3D_OK) dxerror();
}
Also note that all CreateSurface(GDSURFACE_VIDEOMEMORY, ...) automatically will fail on all current PocketPCs since they have no hw acceleration.