
Public Member Functions | |
| virtual MCCOMErr MCCOMAPI | SetScene (I3DShScene *scene)=0 |
| virtual MCCOMErr MCCOMAPI | GetBufferNeeds (uint32 &needs)=0 |
| virtual MCCOMErr MCCOMAPI | PrepareDraw (IShRasterLayer *input, const TMCRect &bounds, IShChannel *buffers[], I3DShScene *scene, I3DShCamera *renderingCamera, const TBBox2D &uvBox, const TBBox2D &productionFrame)=0 |
| virtual MCCOMErr MCCOMAPI | DrawRect (const TMCRect &outputRect, const TChannelDataBucket *outputTile[], const TBBox2D &uvBox)=0 |
| virtual MCCOMErr MCCOMAPI | FinishDraw ()=0 |
| virtual MCCOMErr MCCOMAPI | BeginRender (MicroTick beginTime, MicroTick endTime, uint32 framePerSeconds, int32 nbrFrames, boolean isRenderMovie)=0 |
| virtual MCCOMErr MCCOMAPI | EndRender ()=0 |
Post Renderers can be instantiated in two different ways:
There are two interfaces to access postRenderer: The shell interface (I3DShPostRenderer) and the external interface (I3DExPostRenderer) . You can get one from the other using QueryInterface.
Whenever it is possible you should use the Shell interface (I3DShPostRenderer) to access the component because the Shell will make sure that the parameter map of the external component is valid. This is especially important if the component is animated. For more information on components see the Overview of the SDK.
| virtual MCCOMErr MCCOMAPI I3DShPostRenderer::SetScene | ( | I3DShScene * | scene | ) | [pure virtual] |
Sets the scene that is rendered.
| scene | The scene that is rendered. |
Identifies which GBuffers are necessary to compute this post renderer. To find the various contants used for GBuffer check at the end of I3DExPostRenderer.h
| needs | A bit field that identifies which GBuffers are necessary. The bits are set to 1 if the corresponding GBuffer should be filled. For example, it you want the distance buffer and glow buffer, you write the following code: need = (1<<k32GlowColor) + (1<<k32Distance); |
| virtual MCCOMErr MCCOMAPI I3DShPostRenderer::PrepareDraw | ( | IShRasterLayer * | input, | |
| const TMCRect & | bounds, | |||
| IShChannel * | buffers[], | |||
| I3DShScene * | scene, | |||
| I3DShCamera * | renderingCamera, | |||
| const TBBox2D & | uvBox, | |||
| const TBBox2D & | productionFrame | |||
| ) | [pure virtual] |
Called at the begginning of postrendering to initialise the postrenderer.
| input | The color buffer of the image. | |
| bounds | The image rectangle in pixels | |
| buffers | The array of pointers to the GBuffers (The pointers are null if the corresponding buffer is not allocated) | |
| scene | The scene being rendered | |
| renderingCamera | The current renderingCamera | |
| uvBox | screen Coordinates of the image to render | |
| productionFrame | Screen coordinates of the production frame |
| virtual MCCOMErr MCCOMAPI I3DShPostRenderer::DrawRect | ( | const TMCRect & | outputRect, | |
| const TChannelDataBucket * | outputTile[], | |||
| const TBBox2D & | uvBox | |||
| ) | [pure virtual] |
Called for each tile of the output image. This is where the actual rendering takes place.
| outputRect | The Rectangle of the tile (in pixels) | |
| outputTile | Pointers to pixel buckets (R,G,B,A) of the output tile. | |
| uvBox | The screen coordinates of the tile |
| virtual MCCOMErr MCCOMAPI I3DShPostRenderer::FinishDraw | ( | ) | [pure virtual] |
Called for clean up at the end of the postrendering (after DrawRect()).
| virtual MCCOMErr MCCOMAPI I3DShPostRenderer::BeginRender | ( | MicroTick | beginTime, | |
| MicroTick | endTime, | |||
| uint32 | framePerSeconds, | |||
| int32 | nbrFrames, | |||
| boolean | isRenderMovie | |||
| ) | [pure virtual] |
Called at the beginning of the rendering of an animation. This can be used if you want to create a Post Renderer that depends on previous frames.
| beginTime | The time at which the rendering starts (in MicroTick) | |
| endTime | The time at which the rendering ends (in MicroTick) | |
| framePerSeconds | The number of frame per second | |
| nbrFrames | The total number of frame that will be rendered. | |
| isRenderMovie | True if an animation is being rendered. |
| virtual MCCOMErr MCCOMAPI I3DShPostRenderer::EndRender | ( | ) | [pure virtual] |
Called at the end of the rendering of an animation.
1.5.3