Direct3D retained mode constants in RapidQ
The Microsoft® Direct3D® Retained Mode enumerated types are:
D3DRMCOMBINETYPE

Specifies how to combine two matrices for a QD3DFrame

    D3DRMCOMBINE_REPLACE,
    D3DRMCOMBINE_BEFORE,
    D3DRMCOMBINE_AFTER

Values
D3DRMCOMBINE_REPLACE
Supplied matrix replaces the frame's current matrix.
D3DRMCOMBINE_BEFORE
Supplied matrix is multiplied with the frame's current matrix and precedes the current matrix in the calculation.
D3DRMCOMBINE_AFTER
Supplied matrix is multiplied with the frame's current matrix and follows the current matrix in the calculation.
Remarks

The order of the supplied and current matrices when they are multiplied is important because matrix multiplication is not commutative.


D3DRMFILLMODE

Used to define the D3DRMRENDERQUALITY type.

    D3DRMFILL_POINTS    = 0 * D3DRMLIGHT_MAX,
    D3DRMFILL_WIREFRAME = 1 * D3DRMLIGHT_MAX,
    D3DRMFILL_SOLID     = 2 * D3DRMLIGHT_MAX,
    D3DRMFILL_MASK       = 7 * D3DRMLIGHT_MAX,
    D3DRMFILL_MAX       = 8 * D3DRMLIGHT_MAX

Values
D3DRMFILL_POINTS
Fills points only; minimum fill mode.
D3DRMFILL_WIREFRAME
Fill wire frames.
D3DRMFILL_SOLID
Fill solid objects.
D3DRMFILL_MASK
Fill using a mask.
D3DRMFILL_MAX
Maximum value for fill mode.

D3DRMFOGMODE

Contains values that specify how rapidly and in what ways the fog effect intensifies with increasing distance from the camera.

In monochromatic (ramp) lighting mode, fog works properly only when the fog color is black. (If there is no lighting, any fog color will work, since in this case any fog color is effectively black.)

    D3DRMFOG_LINEAR,
    D3DRMFOG_EXPONENTIAL,
    D3DRMFOG_EXPONENTIALSQUARED

Values
D3DRMFOG_LINEAR
Fog effect intensifies linearly between the start and end points. This is the only fog mode currently supported.
D3DRMFOG_EXPONENTIAL
Fog effect intensifies exponentially, according to the following formula:
D3DRMFOG_EXPONENTIALSQUARED
Fog effect intensifies exponentially with the square of the distance, according to the following formula:
Remarks

Note that fog can be considered a measure of visibility—the lower the fog value produced by one of the fog equations, the less visible an object is.

You can specify the fog's density and start and end points by using the QD3DRMFrame.SetFogParams method. In the formulas for the exponential fog modes, e is the base of the natural logarithms; its value is approximately 2.71828.


D3DRMFRAMECONSTRAINT

Describes the axes of rotation to constrain when viewing a Direct3DRMFrame object. The QD3DRMFrame.LookAt method uses this enumerated type.

    D3DRMCONSTRAIN_Z,
    D3DRMCONSTRAIN_Y,
    D3DRMCONSTRAIN_X

Values
D3DRMCONSTRAIN_Z
Use only x- and y- rotations.
D3DRMCONSTRAIN_Y
Use only x- and z- rotations.
D3DRMCONSTRAIN_X
Use only y- and z- rotations.

D3DRMLIGHTMODE

Used to define the D3DRMRENDERQUALITY type.

    D3DRMLIGHT_OFF      = 0 * D3DRMSHADE_MAX,
    D3DRMLIGHT_ON       = 1 * D3DRMSHADE_MAX,
    D3DRMLIGHT_MASK     = 7 * D3DRMSHADE_MAX,
    D3DRMLIGHT_MAX      = 8 * D3DRMSHADE_MAX

Values
D3DRMLIGHT_OFF
Lighting is off.
D3DRMLIGHT_ON
Lighting is on.
D3DRMLIGHT_MASK
Lighting uses a mask.
D3DRMLIGHT_MAX
Maximum lighting mode.

D3DRMLIGHTTYPE

Defines the light type in uses to the QD3DScreen.CreateLight method.
    D3DRMLIGHT_AMBIENT,
    D3DRMLIGHT_POINT,
    D3DRMLIGHT_SPOT,
    D3DRMLIGHT_DIRECTIONAL,
    D3DRMLIGHT_PARALLELPOINT

Values
D3DRMLIGHT_AMBIENT
Light is an ambient source.
D3DRMLIGHT_POINT
Light is a point source.
D3DRMLIGHT_SPOT
Light is a spotlight source.
D3DRMLIGHT_DIRECTIONAL
Light is a directional source.
D3DRMLIGHT_PARALLELPOINT
Light is a parallel point source.

D3DRMPROJECTIONTYPE

Defines the type of projection used in a Direct3DRMViewport object. The IDirect3DRMViewport::GetProjection and IDirect3DRMViewport::SetProjection methods use this enumerated type. The right-hand types enable right-handed projection.

The axes of the camera (see IDirect3DRMFrame2::SetAxes) are used in both left-handed and right-handed projection to determine what direction the camera is facing.


    D3DRMPROJECT_PERSPECTIVE = 0
    D3DRMPROJECT_ORTHOGRAPHIC = 1
    D3DRMPROJECT_RIGHTHANDPERSPECTIVE = 2
    D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC = 3
Values
D3DRMPROJECT_PERSPECTIVE
Projection is perspective and left-handed.
D3DRMPROJECT_ORTHOGRAPHIC
Projection is orthographic and left-handed.
D3DRMPROJECT_RIGHTHANDPERSPECTIVE
Projection is perspective and right-handed.
D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC
Projection is orthographic and right-handed.

D3DRMRENDERQUALITY

Combines descriptions of the shading mode, lighting mode, and filling mode for a Direct3DRMMesh object.

Values
D3DRMSHADEMODE, D3DRMLIGHTMODE, and D3DRMFILLMODE
These enumerated types describe the shade, light, and fill modes for Direct3DRMMesh objects.
D3DRMRENDER_WIREFRAME
Display only the edges.
D3DRMRENDER_UNLITFLAT
Flat shaded without lighting.
D3DRMRENDER_FLAT
Flat shaded.
D3DRMRENDER_GOURAUD
Gouraud shaded.
D3DRMRENDER_PHONG
Phong shaded. Phong shading is not currently supported.

D3DRMSHADEMODE

Used to define the D3DRMRENDERQUALITY type.

    D3DRMSHADE_FLAT     = 0,
    D3DRMSHADE_GOURAUD  = 1,
    D3DRMSHADE_PHONG    = 2,
    D3DRMSHADE_MASK     = 7,
    D3DRMSHADE_MAX      = 8


D3DRMTEXTUREQUALITY

Describes how a device interpolates between pixels in a texture and pixels in a viewport. This enumerated type is used by the IDirect3DRMDevice::SetTextureQuality and IDirect3DRMDevice::GetTextureQuality methods.

Values
D3DRMTEXTURE_NEAREST
Choose the nearest pixel in the texture. Does not support mipmapping.
D3DRMTEXTURE_LINEAR
Linearly interpolate the four nearest pixels. Does not support mipmapping.
D3DRMTEXTURE_MIPNEAREST
Similar to D3DRMTEXTURE_NEAREST, but uses the appropriate mipmap instead of the texture. Pixel sampling and mipmapping are both nearest.
D3DRMTEXTURE_MIPLINEAR
Similar to D3DRMTEXTURE_LINEAR, but uses the appropriate mipmap instead of the texture. Pixel sampling is linear; mipmapping is nearest.
D3DRMTEXTURE_LINEARMIPNEAREST
Similar to D3DRMTEXTURE_MIPNEAREST, but interpolates between the two nearest mipmaps. Pixel sampling is nearest; mipmapping is linear.
D3DRMTEXTURE_LINEARMIPLINEAR
Similar to D3DRMTEXTURE_MIPLINEAR, but interpolates between the two nearest mipmaps. Both pixel sampling and mipmapping are linear.

D3DRMWRAPTYPE

Defines the type of Direct3DRMWrap object created by the IDirect3DRM::CreateWrap method. You can also use this enumerated type to initialize a Direct3DRMWrap object in a call to the IDirect3DRMWrap::Init method.

    D3DRMWRAP_FLAT = 0
    D3DRMWRAP_CYLINDER = 1
    D3DRMWRAP_SPHERE = 2
    D3DRMWRAP_CHROME = 3

Values

D3DRMWRAP_FLAT
Wrap is flat.
D3DRMWRAP_CYLINDER
Wrap is cylindrical.
D3DRMWRAP_SPHERE
Wrap is spherical.
D3DRMWRAP_CHROME
Wrap allocates texture coordinates so that the texture appears to be reflected onto the objects.