Page 1 of 1

Creating video surfaces

PostPosted: Nov 10, 2002 @ 11:34pm
by Johan

PostPosted: Nov 11, 2002 @ 12:23pm
by Sam Nova
How about:

dxsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_SYSTEMMEMORY;

Will try to use video memory first, and if that fails then it will use system memory.

If the call is done ONLY with DDSCAPS_VIDEOMEMORY and that fails then it should return with an error and leave it to the programmer to do what he wants (possibly use the code that you showed).

PostPosted: Nov 11, 2002 @ 1:02pm
by Johan
Hm. I'm not too keen on this one... It doesn't feel right to supply both flags. I've added a couple of new flags as well (local and non local video memory), so basically it could look like:

CreateSurface(GDSURFACE_VIDEOMEMORY | GDSURFACE_SYSTEMMEMORY | GDSURFACE_LOCALVIDMEM, ...)

Not too good...

Current flags are: GDSURFACE_CLEAR, GDSURFACE_NOCOORDCHECK, GDSURFACE_SYSTEMMEMORY, GDSURFACE_VIDEOMEMORY, GDSURFACE_LOCALVIDMEM, GDSURFACE_NONLOCALVIDMEM

Maybe another flag, like GDSURFACE_FALLBACKTOSYSMEM or similar? This would enable code like:

CreateSurface(GDSURFACE_VIDEOMEMORY | GDSURFACE_LOCALVIDMEM | GDSURFACE_FALLBACKTOSYSMEM, ...)

PostPosted: Nov 11, 2002 @ 1:06pm
by Sam Nova
Oh yeah. Looks VERY nice to me. Also makes more sense.

PostPosted: Nov 12, 2002 @ 8:43pm
by Guest

PostPosted: Nov 12, 2002 @ 8:47pm
by Johan

PostPosted: Nov 12, 2002 @ 10:50pm
by Digby

PostPosted: Nov 12, 2002 @ 11:00pm
by Johan

PostPosted: Nov 13, 2002 @ 1:14am
by Digby

PostPosted: Nov 13, 2002 @ 12:12pm
by Johan

PostPosted: Nov 13, 2002 @ 8:45pm
by Digby

PostPosted: Nov 13, 2002 @ 9:54pm
by Johan