fg_ddgetobj()

Win32 DirectX Fastgraph/Light

Prototype

int fg_ddgetobj (int code);

Function fg_ddgetobj (ByVal code As Long) As Long

function fg_ddgetobj (code : integer) : integer;

Description

The fg_ddgetobj() function returns a pointer to the requested DirectX object.

Parameters

code specifies the DirectX object:

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

Return value

A pointer to the requested DirectX object. The different versions of the objects correspond to the version of DirectX being used. For example, fg_ddgetobj(0) returns a pointer to a DirectDraw2 object if we are using DirectX 5 or earlier, a DirectDraw4 object for DirectX 6, and a DirectDraw7 object for DirectX 7. If the code parameter does not specify one of the values listed above, the return value is zero.

Restrictions

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

The DirectDrawClipper object is meaningful only for windowed programs.

The DirectDrawPalette object is meaningful only for full screen programs.

See also

fg_ddsetobj()

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.