class MRenderTarget

Jump to documentation

Information to perform rendering into a hardware render target. (OpenMayaRender) (OpenMayaRender.py)

public members:

unsigned int width () const
Width of render target in pixels
unsigned int height () const
Height of render target in pixels
void makeTargetCurrent () const
MStatus writeColorBuffer ( const MImage &image, signed short x = 0, signed short y = 0, bool writeDepth = false) const

Documentation

This class contains information about render targets
Description

MRenderTarget is a class contains information about a given hardware render target.

Functions

unsigned int MRenderTarget:: width () const

Description

Return the width in pixels of the render target.

Arguments

  • None

Return Value

  • width value

unsigned int MRenderTarget:: height () const

Description

Return the height in pixels of the render target.

Arguments

  • None

Return Value

  • height value

void MRenderTarget:: makeTargetCurrent () const

Description

Make the render target current for rendering.

Arguments

  • None

Return Value

  • none.

MStatus MRenderTarget:: writeColorBuffer ( const MImage &image, signed short x, signed short y, bool writeDepth) const

Description

Write a 2d image directly to the color buffer, without any transformation. Method will make the context current if it is not already.

If a depth component in the image also exists, then depth values can also be written to.

Arguments

  • image : an MImage 2d image
  • x : lower left corner x position in the target to place the image. Default value is 0.
  • y : lower left corner y position in the target to place the image Default value is 0.
  • writeDepth : write the depth component of the incoming image to the depth component of the render target. If image does not contain any depth component then nothing will be written. Default value is false.

Return Value

  • MStatus::kSuccess if successful.

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright