PDA

View Full Version : suface size limits under directdraw 7


svero
08-22-2005, 07:50 AM
I remember way back when i started doing directx stuff there was a limit where a surface created could not be larger than the primary surface. So for instance you couldnt make a surface 650 pixels across if your primary was only 640.

Does that limit still apply under DirectX7 if using only direct draw?

Ska Software
08-22-2005, 08:26 AM
Yes, but for some odd reason its 640x640 if your primary is 640x480.

If you'd download the Zombie Smashers X2 demo (shameless plug) you'd notice that my intro menu screen utilizes an absolutely brilliant method of fitting a 1280x960 image into DirectX 7 in which it *splits* the image into 4 640x480 graphics! Genius! :D

svero
08-22-2005, 08:31 AM
From the dx7 sdk...

In previous versions of DirectX, the maximum width of off-screen surfaces was limited to the width of the primary surface. Beginning with DirectX 5.0, you can create surfaces as wide as you need, permitting that the display hardware can support them. Be careful when declaring wide off-screen surfaces; if the video card memory cannot hold a surface as wide as you request, the surface is created in system memory. If you explicitly choose video memory and the hardware can't support it, the call fails.