fg_ddsetup()

Win32 DirectX Fastgraph/Light

Prototype

void fg_ddsetup (int width, int height, int depth, int flags);

Sub fg_ddsetup (ByVal width As Long, ByVal height As Long, ByVal depth As Long, ByVal flags As Long)

procedure fg_ddsetup (width, height, depth, flags : integer);

Description

The fg_ddsetup() function defines the display resolution, color depth, and other DirectX information for full screen programs. Calling fg_ddsetup() does not actually set the requested display mode but merely defines how fg_vbinit() will initialize DirectX.

Parameters

width is the horizontal resolution in pixels.

height is the vertical resolution in pixels.

depth is the color depth in bits per pixel. It must be 8, 16, 24, or 32. You can also specify a depth of zero, which is used in hybrid programs that switch between full screen and windowed DirectDraw. If depth is zero, fg_ddsetup() ignores the other three parameters.

flags is a series of flags that specifies how Fastgraph will use DirectX, as summarized here:

Flag

Meaning

FG_DX_BLIT

Use DirectDraw blitting

FG_DX_FLIP

Use DirectDraw page flipping (required for Direct3D)

FG_DX_RENDER_FG

Use Fastgraph rendering for 3D functions

FG_DX_RENDER_SW

Use Direct3D software rendering if available

FG_DX_RENDER_HW

Use Direct3D hardware acceleration if available

FG_DX_ZBUFFER

Create a Direct3D z-buffer

FG_DX_TCDEPTH

Use specified true color bit depth only

If FG_DX_BLIT is specified, FG_DX_RENDER_xx and FG_DX_ZBUFFER are ignored because these flags are specific to Direct3D programs. FG_DX_TCDEPTH is ignored unless the depth parameter is 24 or 32.

Return value

none

Restrictions

The combination of width, height, and depth parameters must define a valid DirectDraw screen resolution and color depth.

For Direct3D programs, you must specify the FG_DX_FLIP flag, and the depth parameter must be 16, 24, or 32.

This function is available only in Fastgraph's DirectX libraries.

See also

fg_ddflip(), fg_ddstatus(), fg_ddusage(), fg_vbinit()

Examples

FrameDD, FullScr, TMcubeX

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.