Multipipe SDK 3.2 Reference

Name

MPKFrame - MPKFrame functional interface.

Header File

#include <mpk/frame.h>

Synopsis

Creating and Destroying

MPKFrame* mpkFrameNew(void );
void mpkFrameDelete(MPKFrame* frame);

Fields Access

int mpkFrameNImages(MPKFrame* frame, int type);
MPKImage* mpkFrameGetImage(MPKFrame* frame, int type, int i);
void mpkFrameAddImage(MPKFrame* frame, int type, MPKImage* image);
int mpkFrameRemoveImage(MPKFrame* frame, int type, MPKImage* image);
void mpkFrameSetFormat(MPKFrame* frame, int format);
int mpkFrameGetFormat(MPKFrame* frame);
void mpkFrameSetRegion(MPKFrame* frame, float region[4]);
void mpkFrameGetRegion(MPKFrame* frame, float region[4]);

Operations

void mpkFrameSetUserData(MPKFrame* frame, void* data);
void* mpkFrameGetUserData(MPKFrame* frame);

Description

The MPKFrame data structure primarily describes a frame in an MPK application. It is a container for MPKImage images. See mpkChannelDrawImage() for a detailed explanation on how to use MPKFrame and MPKImage structures.

Function descriptions

Creating and Destroying

mpkFrameNew creates and returns a handle to an MPKFrame.

mpkFrameDelete deletes the passed MPKFrame.
Fields Access

mpkFrameNImages returns the number of MPKImages for the specified type. Accepted values for type are MPK_COLOR_BIT, MPK_DEPTH_BIT and MPK_STENCIL_BIT.

mpkFrameGetImage returns the ith MPKImage of type. Accepted values for type are MPK_COLOR_BIT, MPK_DEPTH_BIT and MPK_STENCIL_BIT.

mpkFrameAddImage add image of type to this MPKFrame. Accepted values for type are MPK_COLOR_BIT, MPK_DEPTH_BIT and MPK_STENCIL_BIT.

mpkFrameRemoveImage removes image of the specified type from this MPKFrame. Accepted values for type are MPK_COLOR_BIT, MPK_DEPTH_BIT and MPK_STENCIL_BIT.

mpkFrameSetFormat set the frame format. format is a bitwise combination of MPK_COLOR_BIT, MPK_DEPTH_BIT and MPK_STENCIL_BIT.

mpkFrameGetFormat returns the frame format. The returned value is a bitwise combination of MPK_COLOR_BIT, MPK_DEPTH_BIT and MPK_STENCIL_BIT.

mpkFrameSetRegion set the region of the frame. The region describes the 2D fractional viewport with respect to the channel viewport.

mpkFrameGetRegion returns the region of the frame. The region describes the 2D fractional viewport with respect to the channel viewport.
Operations

mpkFrameSetUserData enables the application to specify passthrough data to be transported within the frame structure. Transport is done by reference and not by copy.

mpkFrameGetUserData enables the application to retrieve the passthrough data specified by mpkFrameSetUserData().