The Microsoft® Direct3D® Retained Mode callback functions are:
Enumerates palette entries. This callback function is application-defined.
void (
*D3DRMDEVICEPALETTECALLBACK
)
(
LPDIRECT3DRMDEVICE lpDirect3DRMDev,
LPVOID lpArg,
DWORD dwIndex,
LONG red,
LONG green,
LONG blue
);
No return value.
When determining the order in which to use callback functions, the system searches the objects highest in the hierarchy first, and then uses their callback functions in the order in which they were created.
Enables an application to apply customized algorithms when a frame is moved or updated. You can use this callback function to compensate for changing frame rates. This callback function is application-defined.
void (
*D3DRMFRAMEMOVECALLBACK
)(
LPDIRECT3DRMFRAME lpD3DRMFrame,
LPVOID lpArg,
D3DVALUE delta
);
No return value.
Your application can synthesize the acceleration of a frame relative to its parent frame. To do so, on each tick your application should set the velocity of the child frame relative to itself to (a units per tick) × 1 tick, where a is the required acceleration. This is equal to a × delta units per tick. Internally, a × delta units per tick relative to the child frame is converted to (v + (a × delta)) units per tick relative to the parent frame, where v is the current velocity of the child relative to the parent.
You can add and remove this callback function from your application by using the IDirect3DRMFrame::AddMoveCallback and IDirect3DRMFrame::DeleteMoveCallback methods.
When determining the order in which to use callback functions, the system searches the objects highest in the hierarchy first, and then uses their callback functions in the order in which they were created.
Loads objects named in a call to the IDirect3DRM::Load method. This callback function is application-defined.
void (
*D3DRMLOADCALLBACK
)(
LPDIRECT3DRMOBJECT lpObject,
REFIID ObjectGuid,
LPVOID lpArg
);
No return value.
When determining the order in which to use callback functions, the system searches the objects highest in the hierarchy first, and then uses their callback functions in the order in which they were created.
Loads texture maps from a file or resource named in a call to one of the Load methods. This callback function is application-defined.
HRESULT (
*D3DRMLOADTEXTURECALLBACK
)(
char *tex_name,
void *lpArg,
LPDIRECT3DRMTEXTURE *lpD3DRMTex
);
Should return D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
Applications can use this callback function to implement support for textures that are not in the Microsoft® Windows® bitmap (.bmp) or Portable Pixmap (.ppm) P6 format.
When determining the order in which to use callback functions, the system searches the objects highest in the hierarchy first, and then uses their callback functions in the order in which they were created.
IDirect3DRM::Load, IDirect3DRMAnimationSet::Load, IDirect3DRMFrame::Load, IDirect3DRMMeshBuilder::Load
Enumerates objects in response to a call to the IDirect3DRM::EnumerateObjects method. This callback function is application-defined.
void (
*D3DRMOBJECTCALLBACK
)(
LPDIRECT3DRMOBJECT lpD3DRMobj,
LPVOID lpArg
);
No return value.
When determining the order in which to use callback functions, the system searches the objects highest in the hierarchy first, and then uses their callback functions in the order in which they were created.
Alerts the application when the device changes. This callback function is application-defined.
void (
*D3DRMUPDATECALLBACK
)(
LPDIRECT3DRMDEVICE lpobj,
LPVOID lpArg,
int iRectCount,
LPD3DRECT d3dRectUpdate
);
No return value.
When determining the order in which to use callback functions, the system searches the objects highest in the hierarchy first, and then uses their callback functions in the order in which they were created.
IDirect3DRMDevice::AddUpdateCallback, IDirect3DRMDevice::DeleteUpdateCallback, IDirect3DRMDevice::Update
Alerts an application that supplies user-visual objects that it should execute the execute buffer. This function is application-defined.
int (
*D3DRMUSERVISUALCALLBACK
)(
LPDIRECT3DRMUSERVISUAL lpD3DRMUV,
LPVOID lpArg,
D3DRMUSERVISUALREASON lpD3DRMUVreason,
LPDIRECT3DRMDEVICE lpD3DRMDev,
LPDIRECT3DRMVIEWPORT lpD3DRMview
);
Returns TRUE if the lpD3DRMUVreason parameter is D3DRMUSERVISUAL_CANSEE and the user-visual object is visible in the viewport. Returns FALSE otherwise. If the lpD3DRMUVreason parameter is D3DRMUSERVISUAL_RENDER, the return value is application-defined. It is always safe to return TRUE.
When determining the order in which to use callback functions, the system searches the objects highest in the hierarchy first, and then uses their callback functions in the order in which they were created.
This callback function is not supported.
void (
*D3DRMWRAPCALLBACK
)(
LPD3DVECTOR lpD3DVector,
int* lpU,
int* lpV,
LPD3DVECTOR lpD3DRMVA,
LPD3DVECTOR lpD3DRMVB,
LPVOID lpArg
);
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.