D3DM_OPERATION (Windows CE 5.0)

Send Feedback

This enumeration is used in a command token header, D3DM_COMMAND, to identify the types of command tokens that the Direct3D Mobile middleware may pass to the driver.

typedef enum _D3DM_OPERATION {  D3DMOP_BEGINSCENE,  D3DMOP_ENDSCENE,  D3DMOP_PRESENT,  D3DMOP_COPYRECT,  D3DMOP_CLEAR,  D3DMOP_RENDERTARGET,  D3DMOP_RENDERSTATE,  D3DMOP_TRANSFORM,  D3DMOP_VIEWPORT,  D3DMOP_MATERIAL,  D3DMOP_CREATELIGHT,  D3DMOP_SETLIGHT,  D3DMOP_TEXTURESTAGESTATE,  D3DMOP_CREATEPALETTE,  D3DMOP_SETPALETTE,  D3DMOP_PROCESSVERTICES,  D3DMOP_DRAWPRIMITIVE,  D3DMOP_DRAWINDEXEDPRIMITIVE,  D3DMOP_VERTEXBUFFER,  D3DMOP_INDEXBUFFER,  D3DMOP_COLORFILL,  D3DMOP_STRETCHRECT} D3DM_OPERATION;

Elements

  • D3DMOP_BEGINSCENE
    This value indicates to the driver that it can update its internal state for drawing. The command header will not be followed by any other command data.

  • D3DMOP_ENDSCENE
    This value indicates to the driver that drawing with the current state set is complete and that the state is now more likely to change. The command header will not be followed by any more command data.

  • D3DMOP_PRESENT
    This value indicates to the driver that the current surface is complete and that it needs to be displayed on the screen. The command header will be followed by a single D3DM_PRESENT command token, which, if it appears, will always be at the end of a command buffer.

  • D3DMOP_COPYRECT
    This value indicates to the driver that it should copy pixel data from one surface to another. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_COPYRECT structures.

  • D3DMOP_CLEAR
    This value indicates to the driver that it must clear some combination of the current render target, depth buffer, and stencil buffer. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_CLEAR structures.

  • D3DMOP_RENDERTARGET
    This value indicates to the driver that it should switch its current render target or depth and stencil buffer. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_RENDERTARGET structures.

  • D3DMOP_RENDERSTATE
    This value indicates to the driver that it will have to change one or more of its render states. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_RENDERSTATE structures. Each render state structure instructs the driver to change an internal render state.

  • D3DMOP_TRANSFORM
    This value indicates to the driver that it should change one or more current transformation matrices. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_TRANSFORM structures.

  • D3DMOP_VIEWPORT
    This value indicates to the driver that it should change the current viewport transformation. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_VIEWPORT structures.

  • D3DMOP_MATERIAL
    This value indicates to the driver that it should update the current material properties. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_MATERIAL structures.

  • D3DMOP_CREATELIGHT
    This value indicates to the driver that it should set aside one or more light data structures and assign a handle to each of them. The driver should not make the lights active as part of this operation. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_CREATELIGHT structures, one for each light.

  • D3DMOP_SETLIGHT
    This value indicates to the driver that it should activate one or more lights. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_SETLIGHT structures, one for each light. The driver must be prepared to accommodate both the D3DM_SETLIGHT and D3DM_SETLIGHT_WITHDATA structures. The driver can determine which type of structure is in the token by reading the DataType member of the structure itself. D3DM_SETLIGHT contains a handle to a light and a flag to indicate if the light should be made active. D3DM_SETLIGHT_WITHDATA also contains a handle to a light as well as a full light description that should be applied to the given light.

  • D3DMOP_TEXTURESTAGESTATE
    This value indicates that the driver should change one or more texture states for a given stage. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_TEXTURESTAGESTATE structures.

  • D3DMOP_CREATEPALETTE
    This value indicates that driver should create one or more palette data structures and assign a handle to each one. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_CREATEPALETTE structures, one for each palette.

  • D3DMOP_SETPALETTE
    This value indicates that the driver should activate one or more a palettes. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_SETPALETTE structures. The driver must be prepared to accommodate both styles of that D3DM_SETPALETTE structure by reading a flag in the structure itself. One style contains a handle to a palette that should be activated. The other style also contains a handle to a palette as well as a new full description to put into effect for this palette.

  • D3DMOP_PROCESSVERTICES
    This value indicates that driver should transform and light one or more vertices from the current vertex buffer into the given target vertex buffer. The driver should use all of the current texture and lighting state while processing the vertices. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_PROCESSVERTICES structures.

  • D3DMOP_DRAWPRIMITIVE
    This value indicates that the driver should draw a given primitive type using the current driver state and a given range of vertices from the current vertex buffer. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_DrawPrimitive structures.

  • D3DMOP_DRAWINDEXEDPRIMITIVE
    This value indicates that the driver should draw a given primitive type using the current driver state and a given range of indices from the current index buffer. The command header will be followed by D3DM_COMMAND.nCount D3DM_DRAWINDEXEDPRIMITIVE structures.

  • D3DMOP_VERTEXBUFFER
    This value indicates that the driver should change the current vertex buffer to a new given buffer. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_VERTEXBUFFER structures.

    Unlike Direct3D implementations on Windows-based desktop computers where vertex buffers can be bound to specific device data streams, Direct3D Mobile only supports vertex buffers bound to stream zero. The Direct3D Mobile middleware is hard-coded to assign the stream value passed to IDirect3DMobileDevice::SetStreamSource to zero. The IDirect3DMobileDevice::SetStreamSource method will also only accept a stride parameter of zero.

  • D3DMOP_INDEXBUFFER
    This value indicates that the driver should change the current index buffer to a new given buffer. The command header will be followed by D3DM_COMMAND.nCountD3DM_INDEXBUFFER structures.

  • D3DMOP_COLORFILL
    This value indicates that the driver should perform color fill operations on the given surface with the given color and rectangle. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_COLORFILL structures.

  • D3DMOP_STRETCHRECT
    This value indicates that the driver should perform pixel copies between the given surfaces, applying a stretch if necessary by using the given algorithm. The command header will be followed by D3DM_COMMAND.nCount separate D3DM_STRETCHRECT structures.

Remarks

Because the values from this enumeration must be passed in a BYTE value in the D3DM_COMMAND structure, this enumeration can contain no more than 256 commands.

Requirements

OS Versions: Windows CE 5.0
Header: D3dmddk.h.

See Also

Direct3D Mobile Driver Enumerations | D3DM_COMMAND | D3DM_PRESENT | D3DM_COPYRECT | D3DM_CLEAR | D3DM_RENDERTARGET | D3DM_RENDERSTATE | D3DM_TRANSFORM | D3DM_VIEWPORT | D3DM_MATERIAL | D3DM_CREATELIGHT | D3DM_SETLIGHT | D3DM_SETLIGHT_WITHDATA | D3DM_TEXTURESTAGESTATE | D3DM_CREATEPALETTE | D3DM_SETPALETTE | D3DM_PROCESSVERTICES | D3DM_DrawPrimitive | D3DM_VERTEXBUFFER | IDirect3DMobileDevice::SetStreamSource | D3DM_INDEXBUFFER | D3DM_COLORFILL | D3DM_STRETCHRECT

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.