fg_ddsetobj()

Win32 DirectX Fastgraph/Light

Prototype

void fg_ddsetobj (void *object, int code);

Sub fg_ddsetobj (object As Any, ByVal code As Long)

procedure fg_ddsetobj (var object; code : integer);

Description

The fg_ddsetobj() function defines a pointer to an externally created DirectX object. Normally you will only use this function in specialized applications, or when using Fastgraph with third party DirectX tools.

Parameters

object is a pointer to the DirectX object.

code specifies which DirectX object to define:

0

DirectDraw2, DirectDraw4, or DirectDraw7

1

DirectDrawSurface2, DirectDrawSurface4, or DirectDrawSurface7 for primary surface

2

DirectDrawClipper

3

DirectDrawPalette

4

Direct3D2, Direct3D3, or Direct3D7

5

Direct3DDevice2, Direct3DDevice3, or Direct3DDevice7 (if using hardware acceleration)

6

Direct3DDevice2, Direct3DDevice3, or Direct3DDevice7 (if using software rendering)

7

Direct3DViewport2 or Direct3DViewport3 (not used for DirectX 7)

8

DirectDrawSurface2, DirectDrawSurface4, or DirectDrawSurface7 for Direct3D z-buffer

The different versions of the objects correspond to the version of DirectX being used. For example, if code is zero, fg_ddsetobj() expects a pointer to a DirectDraw2 object for DirectX 5 or earlier, a DirectDraw4 object for DirectX 6, and a DirectDraw7 object for DirectX 7.

Return value

none

Restrictions

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

The DirectDrawClipper object is used only in windowed programs.

The DirectDrawPalette object is used only in full screen programs.

See also

fg_ddapply(), fg_ddgetobj()

Examples

SetupD3D, SetupDD

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.