Direct3DRM3

Applications use the Direct3DRM3 interface to create Direct3DRM3 objects and work with system-level variables.

The methods of the Direct3DRM3 interface create the following objects.

Applications use the Direct3DRMDevice3 interface to interact with the output device. For more information about the capabilities of the output device when you create it by using the Direct3DRM3 interface, see Direct3DRMDevice3.

The methods of the Direct3DRM3 interface can be organized into the following groups.

Animation CreateAnimation
CreateAnimationSet
Clipped visuals CreateClippedVisual
Devices CreateDeviceFromClipper
CreateDeviceFromD3D
CreateDeviceFromSurface
GetDevices
Enumeration EnumerateObjects
Faces CreateFace
Frames CreateFrame
Interpolators CreateInterpolatorFrame
CreateInterpolatorLight
CreateInterpolatorMaterial
CreateInterpolatorMesh
CreateInterpolatorTexture
CreateInterpolatorViewport
Lights CreateLight
CreateLightRGB
Materials CreateMaterial
Meshes CreateMesh
CreateMeshBuilder
Miscellaneous GetNamedObject
GetOptions
LoadFromFile
SetOptions
Tick
Progressive meshes CreateProgressiveMesh
Search paths AddSearchPath
GetSearchPath
SetSearchPath
Shadows CreateShadow
Textures CreateTextureFromSurface
LoadTexture
SetDefaultTextureColors
SetDefaultTextureShades
Viewports CreateViewport
Wraps CreateWrap

Direct3DRM3.AddSearchPath

Direct3DRM3

Adds a list of directories to the end of the current file search path.

Syntax

object.AddSearchPath(name As String)

Parts

object
Object expression that resolves to a Direct3DRM3 object.
name
String specifying the path to add to the current search path.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Remarks

For Microsoft® Windows®, the path should be a list of directories separated by semicolons (;).

See Also

Direct3DRM3.SetSearchPath

Direct3DRM3.CreateAnimation

Direct3DRM3

Creates an empty Direct3DRMAnimation2 object.

Syntax

object.CreateAnimation( ) As Direct3DRMAnimation2

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns a Direct3DRMAnimation2 object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateAnimationSet

Direct3DRM3

Creates an empty Direct3DRMAnimationSet2 object.

Syntax

object.CreateAnimationSet( ) As Direct3DRMAnimationSet2

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns a Direct3DRMAnimationSet2 object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateClippedVisual

Direct3DRM3

Creates a Direct3DRMClippedVisual object.

Syntax

object.CreateClippedVisual(vis As Direct3DRMVisual)
  As Direct3DRMClippedVisual

Parts

object
Object expression that resolves to a Direct3DRM3 object.
vis
Direct3DRMVisual object, such as a Direct3DRMMeshBuilder3 object.

Return Value

Returns a Direct3DRMClippedVisual object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateDeviceFromClipper

Direct3DRM3

Creates a Direct3DRMDevice3 object by using a specified DirectDrawClipper object.

Syntax

object.CreateDeviceFromClipper(DDClipper As DirectDrawClipper,
  guid As String,
  width As Long,
  height As Long) As Direct3DRMDevice3

Parts

object
Object expression that resolves to a Direct3DRM3 object.
DDClipper
DirectDrawClipper object.
guid
Globally unique identifier (GUID). This parameter can be "".
width, height
Width and height of the device to be created, in pixels.

Return Value

Returns a Direct3DRMDevice3 object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Remarks

If the guid parameter is "", the system searches for a device with a default set of device capabilities. This is the recommended way to create a Retained Mode device because it always works, even if the user installs new hardware.

The system describes the default settings by using a D3DPRIMCAPS type in internal device-enumeration calls.

If a hardware device is not found, the monochromatic (ramp) software driver is loaded. An application should enumerate devices instead of specifying "" in the guid parameter if it has special needs that are not met by this list of default settings. Specifying "" in the guid parameter will chose a hardware device if one is available and default to a software rasterizer if one is not.

To specify a device, locate the appropriate GUID by getting a Direct3D3 object through DirectDraw4 by calling the GetDirect3D method. Then, call GetDevicesEnum on the Direct3D3 object to get a Direct3DEnumDevices object. From the Direct3DEnumDevices, object you can match GUIDs to device descriptions and capabilities.

For more information about devices, see Direct3DRMDevice3.

Direct3DRM3.CreateDeviceFromD3D

Direct3DRM3

Creates a Direct3D Retained Mode Windows device by using specified Direct3D objects.

Syntax

object.CreateDeviceFromD3D(D3D As Direct3D3,
  dev As Direct3DDevice3) As Direct3DRMDevice3

Parts

object
Object expression that resolves to a Direct3DRM3 object.
D3D
Instance of a Direct3D3 Immediate Mode object.
dev
Direct3DDevice3 Immediate Mode device object.

Return Value

Returns a Direct3DRMDevice3 object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Remarks

For more information about devices, see Direct3DRMDevice3.

Direct3DRM3.CreateDeviceFromSurface

Direct3DRM3

Creates a Direct3D Retained Mode Windows device for rendering from the specified DirectDraw surfaces.

Syntax

object.CreateDeviceFromSurface(g As String,
  dd As DirectDraw4,
  ddS As DirectDrawSurface4,
  flags As CONST_D3DRMCREATEDEVICEFLAGS) As Direct3DRMDevice3

Parts

object
Object expression that resolves to a Direct3DRM3 object.
g
Globally unique identifier (GUID) used as the required device driver. If this parameter is "", the default device driver is used.
dd
DirectDraw4 object that is the source of the DirectDraw surface.
ddS
DirectDrawSurface4 object that represents the back buffer.
flags
One or more values from the CONST_D3DRMCREATEDEVICEFLAGS enumerated type.

Return Value

Returns a Direct3DRMDevice3 object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Remarks

For more information about devices, see Direct3DRMDevice3.

Direct3DRM3.CreateFace

Direct3DRM3

Creates an instance of the Direct3DRMFace2 interface.

Syntax

object.CreateFace( ) As Direct3DRMFace2

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns a Direct3DRMFace2 object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateFrame

Direct3DRM3

Creates a new child frame of the given parent frame.

Syntax

object.CreateFrame(parent As Direct3DRMFrame3) As Direct3DRMFrame3
 

Parts

object
Object expression that resolves to a Direct3DRM3 object.
parent
Direct3DRMFrame3 object that will be the parent of the new frame.

Return Value

Returns a Direct3DRMFrame3 object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Remarks

The child frame inherits the motion attributes of its parent. For example, if the parent is moving with a given velocity, the child frame will also move with that velocity. Furthermore, if the parent is set to rotate, the child frame will rotate about the origin of the parent. Frames that have no parent are called scenes. To create a scene, specify NOTHING as the parent. An application can create a frame with no parent and then associate it with a parent frame later by using the Direct3DRMFrame3.AddChild method.

If an application calls Direct3DRM3.SetOptions to set right-handed geometry, the default axes for root frames becomes v = (0, 0, -1) and u = (0, 1, 0). (Note: to create a root frame, the parent should be NOTHING.) Therefore, Direct3DRMFrame3.GetOrientation and Direct3DRMFrame3.SetOrientation work correctly in right-handed mode.

Direct3DRM3.CreateInterpolatorFrame

Direct3DRM3

Creates an instance of a Direct3DRMFrameInterpolator interface.

Syntax

object.CreateInterpolatorFrame( ) As Direct3DRMFrameInterpolator
 

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns a Direct3DRMFrameInterpolator object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateInterpolatorLight

Direct3DRM3

Creates an instance of a Direct3DRMLightInterpolator interface.

Syntax

object.CreateInterpolatorLight( ) As Direct3DRMLightInterpolator
 

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns a Direct3DRMLightInterpolator object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateInterpolatorMaterial

Direct3DRM3

Creates an instance of a Direct3DRMMaterialInterpolator interface.

Syntax

object.CreateInterpolatorMaterial( ) As Direct3DRMMaterialInterpolator
 

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns a Direct3DRMMaterialInterpolator object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateInterpolatorMesh

Direct3DRM3

Creates an instance of a Direct3DRMMeshInterpolator interface.

Syntax

object.CreateInterpolatorMesh( ) As Direct3DRMMeshInterpolator
 

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns a Direct3DRMMeshInterpolator object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateInterpolatorTexture

Direct3DRM3

Creates an instance of a Direct3DRMTextureInterpolator interface.

Syntax

object.CreateInterpolatorTexture( ) As Direct3DRMTextureInterpolator
 

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns a Direct3DRMTextureInterpolator object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateInterpolatorViewport

Direct3DRM3

Creates an instance of a Direct3DRMViewportInterpolator interface.

Syntax

object.CreateInterpolatorViewport( ) As Direct3DRMViewportInterpolator
 

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns a Direct3DRMViewportInterpolator object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateLight

Direct3DRM3

Creates a new light source with the given type and color.

Syntax

object.CreateLight(lt As CONST_D3DRMLIGHTTYPE,
  color As Long) As Direct3DRMLight

Parts

object
Object expression that resolves to a Direct3DRM3 object.
lt
One of the lighting types given in the CONST_D3DRMLIGHTTYPE enumerated type.
color
Long value packed with 4 bytes representing the color of the light. The last 3 bytes represent the RGB components of the color. You can use CreateColorRGB from the DirectX 7 object to return a Long color value. For a description of different light types, see the Overviews section in the Direct3D Retained Mode C++ documentation.

Return Value

Returns a Direct3DRMLight object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateLightRGB

Direct3DRM3

Creates a new light source with the given red, green, and blue components.

Syntax

object.CreateLightRGB(lt As CONST_D3DRMLIGHTTYPE,
  vred As Single,
  vgreen As Single,
  vblue As Single) As Direct3DRMLight

Parts

object
Object expression that resolves to a Direct3DRM3 object.
lt
One of the lighting types given in the CONST_D3DRMLIGHTTYPE enumerated type.
vred, vgreen, vblue
Color of the light. Each component of the color should be in the range 0.0 to 1.0.

Return Value

Returns a Direct3DRMLight object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateMaterial

Direct3DRM3

Creates a material with the given specular property.

Syntax

object.CreateMaterial(d As Single) As Direct3DRMMaterial2

Parts

object
Object expression that resolves to a Direct3DRM3 object.
d
Sharpness of the reflected highlights, with a value of 5 giving a metallic look and higher values giving a more plastic look to the rendered surface.

Return Value

Returns a Direct3DRMMaterial2 object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateMesh

Direct3DRM3

Creates a new mesh object with no faces. The mesh is not visible until it is added to a frame.

Syntax

object.CreateMesh( ) As Direct3DRMMesh

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns a Direct3DRMMesh object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateMeshBuilder

Direct3DRM3

Creates a new mesh builder object.

Syntax

object.CreateMeshBuilder( ) As Direct3DRMMeshBuilder3

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns a Direct3DRMMeshBuilder3 object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Remarks

By default, perspective correction is on.

Direct3DRM3.CreateProgressiveMesh

Direct3DRM3

Creates a new progressive mesh object with no faces. The mesh is not visible until it is added to a frame.

Syntax

object.CreateProgressiveMesh( ) As Direct3DRMProgressiveMesh

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns a Direct3DRMProgressiveMesh object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateShadow

Direct3DRM3

Creates a shadow by using the specified visual and light, projecting the shadow onto the specified plane. The shadow is a visual that should be added to the frame that contains the visual.

Syntax

object.CreateShadow(visual As Direct3DRMVisual,
  light As Direct3DRMLight,
  px As Single,
  py As Single,
  pz As Single,
  nx As Single,
  ny As Single,
  nz As Single) As Direct3DRMShadow2

Parts

object
Object expression that resolves to a Direct3DRM3 object.
visual
Direct3DRMVisual object.
light
Direct3DRMLight object that is the light source.
px, py, pz
Plane that the shadow will be projected on.
nx, ny, nz
Normal to the plane that the shadow will be projected on.

Return Value

Returns a Direct3DRMShadow2 object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateTextureFromSurface

Direct3DRM3

Creates a texture from a specified DirectDraw surface.

Syntax

object.CreateTextureFromSurface(
    ddS As DirectDrawSurface4)
    As Direct3DRMTexture3

Parts

object
Object expression that resolves to a Direct3DRM3 object.
ddS
DirectDrawSurface4 object containing the texture.

Return Value

Returns a Direct3DRMTexture3 object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.CreateViewport

Direct3DRM3

Creates a viewport on a device with device coordinates (x, y) to (x + w, y + h).

Syntax

object.CreateViewport(dev As Direct3DRMDevice3,
  fr As Direct3DRMFrame3,
  x As Long,
  y As Long,
  w As Long,
  h As Long) As Direct3DRMViewport2

Parts

object
Object expression that resolves to a Direct3DRM3 object.
dev
Direct3DRMDevice3 object on which the viewport will be created.
fr
Direct3DRMFrame3 object that describes the position and direction of the view.
x, y, w, h
Position and size of the viewport, in device coordinates. The viewport size cannot be larger than the physical device or the method will fail.

Return Value

Returns a Direct3DRMViewport2 object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Remarks

The viewport displays objects in the scene that contain the camera (fr), with the view direction and up vector taken from the camera.

For more information about devices, see Direct3DRMDevice3.

Direct3DRM3.CreateWrap

Direct3DRM3

Creates a wrapping function that you can use to assign texture coordinates to faces and meshes.

Syntax

object.CreateWrap(t As CONST_D3DRMWRAPTYPE,
  f As Direct3DRMFrame3,
  ox As Single,
  oy As Single,
  oz As Single,
  dx As Single,
  dy As Single,
  dz As Single,
  ux As Single,
  uy As Single,
  uz As Single,
  ou As Single,
  ov As Single,
  su As Single,
  sv As Single) As Direct3DRMWrap

Parts

object
Object expression that resolves to a Direct3DRM3 object.
t
One of the members of the CONST_D3DRMWRAPTYPE enumerated type.
f
Reference Direct3DRMFrame3 object for the wrap.
ox, oy, oz
Origin of the wrap.
dx, dy, dz
The z-axis of the wrap.
ux, uy, uz
The y-axis of the wrap.
ou, ov
Origin in the texture.
su, sv
Scale factor in the texture.

Return Value

Returns a Direct3DRMWrap object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Remarks

For a description of wraps, see the Overviews section in the Direct3D Retained Mode C++ documentation.

Direct3DRM3.EnumerateObjects

Direct3DRM3

Uses the specified callback interface on each of the active Direct3D Retained Mode objects.

Syntax

object.EnumerateObjects(
    enumerateObjectsImplementation As Direct3DRMEnumerateObjectsCallback,
    userArgument As object)

Parts

object
Object expression that resolves to a Direct3DRM3 object.
enumerateObjectsImplementation
Application-defined Direct3DRMEnumerateObjectsCallback callback interface to use with each Direct3DRMObject object and the application-defined argument.
userArgument
Application-defined data passed to the callback.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.GetDevices

Direct3DRM3

Retrieves all the Direct3D Retained Mode devices that have been created in the system.

Syntax

object.GetDevices( ) As Direct3DRMDeviceArray

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns a Direct3DRMDeviceArray object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRM3.GetNamedObject

Direct3DRM3

Finds the Direct3DRMObject object with a specified name.

Syntax

object.GetNamedObject(name As String) As Direct3DRMObject

Parts

object
Object expression that resolves to a Direct3DRM3 object.
name
Name of the object to search for.

Return Value

Returns a Direct3DRMObject object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Remarks

If the system does not find an object with the name specified in the name parameter, this method returns D3DRM_OK but the name parameter is "".

Example

Set O = rm.GetNamedObject("object")
If O is Nothing then
    Debug.Print "Object not found"
End If

Direct3DRM3.GetOptions

Direct3DRM3

Retrieves whether Direct3D Retained Mode uses left-handed or right-handed geometry.

Syntax

object.GetOptions( ) As CONST_D3DRMHANDEDNESS

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns a value from the CONST_D3DRMHANDEDNESS enumerated type that indicates the current Direct3D Retained Mode options.

Error Values

If an error occurs, this method returns DDERR_INVALIDOBJECT or DDERR_INVALIDPARAMS.

See Also

Direct3DRM3.SetOptions

Direct3DRM3.GetSearchPath

Direct3DRM3

Retrieves the current search path. For Windows, the path is a list of directories separated by semicolons (;).

Syntax

object.GetSearchPath( ) As String

Parts

object
Object expression that resolves to a Direct3DRM3 object.

Return Value

Returns the current search path as a string.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

See Also

Direct3DRM3.SetSearchPath

Direct3DRM3.LoadFromFile

Direct3DRM3

Loads an object.

Syntax

object.LoadFromFile(filename As String,
  id As String,
  guidArray() As String,
  count As Long,
  options As CONST_D3DRMLOADFLAGS,
  loadCallbackImplementation As Direct3DRMLoadCallback,
  loadArgument As object,
  loadTextureImplementation As Direct3DRMLoadTextureCallback3,
  loadTextureArgument As object,
  parentFrame As Direct3DRMFrame3)

Parts

object
Object expression that resolves to a Direct3DRM3 object.
filename
Full path to the file.
id
Object name or position to be loaded. If id is "", you must set the options parameter to D3DRMLOAD_FIRST. Note that Microsoft Visual Basic® will accept an Integer in the id parameter, indicating the position of the item to be loaded, even though a String data type is specified. For example, placing 1 in the id parameter will load the object in the first position.
guidArray
Interface identifier to load. For example, if this parameter is a two-element array containing IID_Direct3DRMMeshBuilder3 and IID_Direct3DRMAnimationSet2, this method loads all the animation sets and mesh-builder objects. Possible GUIDs must be one or more of the following: IID_Direct3DRMProgressiveMesh, IID_Direct3DRMMeshBuilder3, IID_Direct3DRMAnimationSet2, IID_Direct3DRMAnimation2, or IID_Direct3DRMFrame3. See Remarks.
count
Number of elements specified in the guidArray parameter.
options
One or more values from the CONST_D3DRMLOADFLAGS enumeration describing the load options.
loadCallbackImplementation
Direct3DRMLoadCallback callback interface used when the system reads the specified object.
loadArgument
Application-defined data passed to the Direct3DRMLoadCallback callback interface.
loadTextureImplementation
Direct3DRMLoadTextureCallback3 callback interface used to load any textures used by an object that require special formatting. Textures must have a width and length divisible by 2. This parameter can be NOTHING.
loadTextureArgument
Application-defined data passed to the Direct3DRMLoadTextureCallback3 callback interface.
parentFrame
Parent Direct3DRMFrame3 object. This argument only affects the loading of animation sets. When an animation that is loaded from an .x file references an unparented frame in the .x file, the unparented frame's parent is set to the parent frame at f. However, if you use LoadFromFile to load any frames in the .x file, the parent frame at parentFrame will not be used as the parent frame for frames in the .x file with no parent. That is, parentFrame is used only when you load animation sets. The f parameter can be NOTHING.

Error Values

For a list of possible return codes, see Direct3D Retained Mode Error Values.

Remarks

By default, perspective correction is on.

Each of the LoadFromFile methods uses a filename parameter to specify the source of the object and an id parameter to identify the object. The system interprets the contents of filename based on the choice of source flags, and it interprets the contents of id based on the choice of identifier flags.

The instance flags do not change the interpretation of any of the members. By using the D3DRMLOAD_INSTANCEBYREFERENCE flag, an application can load the same file twice without creating any new objects. If an object does not have a name, setting the D3DRMLOAD_INSTANCEBYREFERENCE flag has the same effect as setting the D3DRMLOAD_INSTANCEBYCOPYING flag—the loader creates each unnamed object as a new one, even if some of the objects are identical.

Remarks

With a count value of 3, guidArray could be filled as follows.

Dim guidArray(3) As String
		
guidArray(0)="IID_Direct3DRMMeshBuilder3"
guidArray(1)="IID_Direct3DRMFrame3"
guidArray(2)="IID_Direct3DRMAnimationSet2"

Direct3DRM3.LoadTexture

Direct3DRM3

Loads a Direct3DRMTexture3 texture from the specified file. This texture can have 8, 24, or 32 bits per pixel, and it should be in either the Windows bitmap (.bmp) or Portable Pixmap (.ppm) P6 format.

Syntax

object.LoadTexture(name As String) As Direct3DRMTexture3

Parts

object
Object expression that resolves to a Direct3DRM3 object.
name
Name of the required .bmp or .ppm file.

Return Value

Returns a Direct3DRMTexture3 object.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Remarks

LoadTexture checks whether the texture is in BMP or PPM format, which are the formats it can load.

Direct3DRM3.SetDefaultTextureColors

Direct3DRM3

Sets the default colors to be used for a Direct3DRMTexture3 object.

Syntax

object.SetDefaultTextureColors(numTextureColors As Long)

Parts

object
Object expression that resolves to a Direct3DRM3 object.
numTextureColors
Number of colors.

Error Values

For a list of possible return codes, see Direct3D Retained Mode Error Values.

Remarks

This method affects the texture colors only when it is used before the Direct3DRM3.CreateTextureFromSurface method; it has no effect on textures that have already been created.

Direct3DRM3.SetDefaultTextureShades

Direct3DRM3

Sets the default shades to be used for a Direct3DRMTexture3 object.

Syntax

object.SetDefaultTextureShades(numTextureShades As Long)

Parts

object
Object expression that resolves to a Direct3DRM3 object.
numTextureShades
Number of shades.

Error Values

For a list of possible return codes, see Direct3D Retained Mode Error Values.

Remarks

This method affects the texture shades only when it is used before the Direct3DRM3.CreateTextureFromSurface method; it has no effect on textures that have already been created.

Direct3DRM3.SetOptions

Direct3DRM3

Sets whether Direct3D Retained Mode uses left-handed or right-handed geometry.

Syntax

object.SetOptions(options As CONST_D3DRMHANDEDNESS)

Parts

object
Object expression that resolves to a Direct3DRM3 object.
options
Value from the CONST_D3DRMHANDEDNESS that indicates the current Direct3D Retained Mode options.

Error Values

For a list of possible return codes, see Direct3D Retained Mode Error Values.

See Also

Direct3DRM3.GetOptions

Direct3DRM3.SetSearchPath

Direct3DRM3

Sets the current file search path from a list of directories. For Windows, the path should be a list of directories separated by semicolons (;).

Syntax

object.SetSearchPath(name As String)

Parts

object
Object expression that resolves to a Direct3DRM3 object.
name
String specifying the path to set as the current search path.

Error Values

For a list of possible return codes, see Direct3D Retained Mode Error Values.

See Also

Direct3DRM3.GetSearchPath

Direct3DRM3.Tick

Direct3DRM3

Performs the Direct3D Retained Mode system heartbeat. When this method is used, the positions of all moving frames are updated according to their current motion attributes, the scene is rendered to the current device, and relevant callbacks are used at their appropriate times. Control is returned when the rendering cycle is complete.

Syntax

object.Tick(tic As Single)

Parts

object
Object expression that resolves to a Direct3DRM3 object.
tic
Value representing arbitrary units. For example, if you set a velocity of 1,0,0 (see Direct3DRMFrame3.SetVelocity) and a tick value (tic) of 1, the animation will move 1 unit in the x-direction.

Error Values

For a list of possible return codes, see Direct3D Retained Mode Error Values.

Remarks

You can implement this method by using other Retained Mode methods to allow more flexibility in rendering a scene:


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.