The ILxViewObject is used to generate passes that are used for drawing. It is usually generated by a modifier attached to an item that wishes to draw. At draw time, the passes (also ILxViewObjects) are generated and passed to the drawing loop.
TestMode(LXtObjectID self, unsigned int type)¶
The TestMode function is used to test if a draw pass type is available. It is called with a single type, such as BBox or Surface. If the function returns LXe_TRUE, it has been generated and is available. If the function returns LXe_FALSE, the Generate function should be called to generate that data. The function can also return LXe_NOTREADY to specify that the ViewObject is working on generating the data in a thread, or LXe_NOTAVAILABLE if the requested data is not supported.
The Flags method allows the ViewObject to declare some properties that determine how it should be evaluated.
Generate(LXtObjectID self, unsigned int type)¶
If the TestMode function has declared that work needs to be done to generate the ViewObject data, the Generate function will be called. It is expected to generate new draw passes of the requested type. This function may be called from threads if that is supported.
Count(LXtObjectID self, unsigned int type)¶
The Count method is expected to return the number of available draw passes of the requested type.
ByIndex(LXtObjectID self, unsigned int type, unsigned int index, void **ppvObj)¶
The ByIndex method is expected to return draw passes by index of the requested type.