CDXBaseNTo1 Data Members
Each transform inherits a number of important data members from the CDXBaseNTo1 base class. Many of them require initialization in your transform's constructor so that transform users can determine its supported capabilities. Others can be changed from outside the transform to select different output options.
You can initialize your transform in the constructor of your derived class, or you can override the Active Template Library (ATL) CComObjectRootEx::FinalConstruct method and initialize the object there. If your transform allocates any resources, you should override the FinalConstruct method so you can return an error if the resource allocation failed.
Some data members are interface pointers inherited from the IDXTransform interface. Your transform can use them to create surfaces, DXSurfaceModifiers (Surface Modifiers), and other transforms.
For an overview of the role of these data members in your transform, see Using the CDXBaseNTo1 Base Class.
Pointer to the Microsoft DirectDraw object associated with this transform.
Pointer to the IDXSurfaceFactory interface that is associated with this transform. This is helpful for creating temporary surfaces.
Pointer to the IDXTaskManager interface that is associated with this transform. You can use the task manager to asynchronously schedule work across the available processors in the system. In most cases, this is done automatically for images by the base class's CDXBaseNTo1::OnExecute method.
Pointer to the IDXTransformFactory interface that initialized this transform.
The suggested duration for a transform effect, in seconds. Transforms that inherit from IDXEffect should initialize this to a suitable value for the effect.
A set of flags from the DXBLTOPTIONS enumeration passed to the DXBitBlt helper function which determine how the source DXSurface should be blitted onto the destination DXSurface. These flags are also used internally by the CDXBaseNTo1::DoOver and CDXBaseNTo1::DoDither helper functions.
Value of the generation ID the last time the CDXBaseNTo1::ClearDirty method was called. If it does not match the m_dwGenerationId, the transform is considered to be "dirty" and you should call IDXTransform::Setup before another call to the IDXTransform::Execute method.
Generation ID of the transform. Each time the transform inputs or properties change, the generation ID is incremented.
Set of flags used to communicate certain transform behavior to transform users through the IDXTransform::GetMiscFlags method. The user can also set certain flags to request certain kinds of output. Typically, 2-d transforms should set appropriate values in the FinalConstruct method. For details, see the DXTMISCFLAGS enumeration.
Set of flags that can be set in the FinalConstruct method to control the behavior of the base class. This member can be one or more of the following values.
DXBOF_INPUTS_MESHBUILDER Specifies that the transform expects mesh builder objects as the input type.
DXBOF_OUTPUT_MESHBUILDER Specifies that the transform expects a mesh builder object as the output type.
DXBOF_SAME_SIZE_INPUTS Specifies that the transform requires input surfaces of the same size. If set, the base class will create a Surface Modifier if necessary to create an empty space around the input filled with zero alpha.
DXBOF_CENTER_INPUTS Used with the DXBOF_SAME_SIZE_INPUTS to specify that the transform requires the inputs to be centered. The default is to align the inputs by their upper-left corners.
If the DXTMF_QUALITY_SUPPORTED element of the DXTMISCFLAGS enumeration is set for a transform, this number represents the quality with which the transform output should be rendered. The container can call the IDXTransform::SetQuality method to change this data member. When the transform is executed, it should choose different processing methods according to this data member's value, which ranges from 0.0 to 1.0. For example, you could choose different filtering types on images based on this value. The default value is 0.5.
Amount of progress made in a transform effect, as a value from 0.0 to 1.0. This value accessed from the IDXEffect interface is used to provide animation effects to transform output. You should initialize this to zero in the constructor of your transform.
Number of discrete steps between the progress from 0 to 1. This value is a hint to the transform user so they can minimize the number of calls to IDXTransform::Execute. The default value is zero.
Default time in milliseconds to be used when acquiring surface locks. The default value is INFINITE, indicating that functions will not return until the lock is acquired.
An image execution request can be divided into multiple bands, each being executed on a different CPU in parallel. By default, the value is set equal to the number of processors in the system. You can control base class execution behavior by changing this value in the FinalConstruct method. If this member is set to 0, CDXBaseNTo1::OnExecute is called for images instead of CDXBaseNTo1::WorkProc. If this member is set to 1, the execution request is not divided and CDXBaseNTo1::WorkProc is guaranteed to execute on a single thread. If this member is not set, the base class will automatically do parallel processing based on the underlying hardware configuration. The default value is 1.
Maximum number of inputs allowed during setup of the transform. The default value is 1. If your implementation can accept a number different from 1, you should assign the correct value in your override of the FinalConstruct method.
Number of inputs currently defined for the transform.
Number of inputs required by the transform to function properly. The default value is 1. If your implementation can accept a number different than 1, you should assign the correct value in your override of the FinalConstruct method.
If your object has a maximum or required number of objects different than one, you must set these values in the body of your constructor or in FinalConstruct. For every input that is greater than the number required, that input is considered to be optional. For example, if your transform takes two required inputs, set both m_ulMaxInputs and m_ulNumInRequired to 2. If your transform takes two optional inputs, set m_ulMaxInputs to 2 and m_ulNumInRequired to 0. For more complex combinations of optional/required, you must override the CDXBaseNTo1::OnSetup method, and override the IDXTransform::GetInOutInfo method.