MPKCompound - MPKCompound functional interface.| MPKCompound* | mpkCompoundNew(void ); |
| void | mpkCompoundDelete(MPKCompound* compound); |
| void | mpkCompoundTraverseAll(MPKCompound* compound, MPKCompoundCB preCB, MPKCompoundCB leafCB, MPKCompoundCB postCB, void* userdata); |
| void | mpkCompoundTraverseActive(MPKCompound* compound, MPKCompoundCB preCB, MPKCompoundCB leafCB, MPKCompoundCB postCB, void* data); |
| void | mpkCompoundTraverseCurrent(MPKCompound* compound, MPKCompoundCB preCB, MPKCompoundCB leafCB, MPKCompoundCB postCB, void* data); |
| void | mpkCompoundSetMode(MPKCompound* compound, int mode, int flags); |
| void | mpkCompoundGetMode(MPKCompound* compound, int* mode, int* flags); |
| void | mpkCompoundSetOperation(MPKCompound* compound, int operation); |
| int | mpkCompoundGetOperation(MPKCompound* compound); |
| void | mpkCompoundSetName(MPKCompound* compound, char* name); |
| const char* | mpkCompoundGetName(MPKCompound* compound); |
| void | mpkCompoundSetSplit(MPKCompound* compound, char* split); |
| const char* | mpkCompoundGetSplit(MPKCompound* compound); |
| void | mpkCompoundSetDisplayName(MPKCompound* compound, char* name); |
| const char* | mpkCompoundGetDisplayName(MPKCompound* compound); |
| void | mpkCompoundSetChannel(MPKCompound* compound, MPKChannel* c); |
| MPKChannel* | mpkCompoundGetChannel(MPKCompound* compound); |
| void | mpkCompoundSetViewport(MPKCompound* compound, float* vp); |
| void | mpkCompoundGetViewport(MPKCompound* compound, float* vp); |
| void | mpkCompoundSetEye(MPKCompound* compound, int eye); |
| int | mpkCompoundGetEye(MPKCompound* compound); |
| void | mpkCompoundSetFormat(MPKCompound* compound, int format); |
| int | mpkCompoundGetFormat(MPKCompound* compound); |
| void | mpkCompoundSetRange(MPKCompound* compound, float range[2]); |
| void | mpkCompoundGetRange(MPKCompound* compound, float range[2]); |
| int | mpkCompoundNChildren(MPKCompound* c); |
| MPKCompound* | mpkCompoundGetChild(MPKCompound* c, int i); |
| void | mpkCompoundAddChild(MPKCompound* compound, MPKCompound* child); |
| int | mpkCompoundRemoveChild(MPKCompound* c, MPKCompound* child); |
| MPKCompound* | mpkCompoundGetNext(MPKCompound* c); |
| MPKCompound* | mpkCompoundGetParent(MPKCompound* c); |
| MPKConfig* | mpkCompoundGetConfig(MPKCompound* c); |
| MPKCompound* | mpkCompoundFindChild(MPKCompound* c, const char* name); |
| void | mpkCompoundSetUserData(MPKCompound* compound, void* userData); |
| void* | mpkCompoundGetUserData(MPKCompound* c); |
| MPKFrame* | mpkCompoundGetAssemblyFrame(MPKCompound* compound, int i); |
| void | mpkCompoundPreAssemble(MPKCompound* compound, void* data); |
| void | mpkCompoundPostAssemble(MPKCompound* compound, void* data); |
| MPKFrame* | mpkCompoundGetOutputFrame(MPKCompound* compound); |
| void | mpkCompoundReadOutputFrame(MPKCompound* compound); |
| void | mpkCompoundClear(MPKCompound* compound, void* data); |
compound {
mode [ CULL ]
channel "dest"
region { cull channel "cull" }
region { draw channel "dest" }
}
|
compound {
mode [2D]
channel "destination"
region {
viewport [ 0. 0. .5 1. ]
channel "source::0"
}
region {
viewport [ .5 0. .5 1. ]
channel "source::1"
}
}
|
"destination"
o
|
+----------+----------+
| |
| |
o o
"source::0" "source::1"
|
typedef int (*MPKCompoundCB)( MPcompound *, void *userdata );
void mpkCompoundTraverseAll(MPKCompound *, MPKCompoundCB preCB,
MPKCompoundCB leafCB, MPKCompoundCB postCB, void *userdata );
void mpkCompoundTraverseActive(MPKCompound *, MPKCompoundCB preCB,
MPKCompoundCB leafCB, MPKCompoundCB postCB, void *userdata );
void mpkCompoundTraverseCurrent(MPKCompound *, MPKCompoundCB preCB,
MPKCompoundCB leafCB, MPKCompoundCB postCB, void *userdata );
|
leafCB function will be applied only on the leaf nodes of the compound tree, ie. on compounds without any children. The preCB and postCB functions will be applied when traversing parent compounds.MPK_TRAV_CONT, MPK_TRAV_PRUNE or MPK_TRAV_TERM to indicate that the traversal should continue, skip this node or terminate, respectively. MPK_TRAV_PRUNE is equivalent to MPK_TRAV_CONT for the postCB function.DPLEX cycle.id characterizes the decomposition mode, and accepts the following values: MPK_COMPOUND_2D, MPK_COMPOUND_3D, MPK_COMPOUND_DB, MPK_COMPOUND_FSAA, MPK_COMPOUND_EYE, MPK_COMPOUND_HMD, MPK_COMPOUND_DPLEX and MPK_COMPOUND_CULL.flags specifies additional flags for the compound mode. Currently, the following flags can be specified:
MPK_COMPOUND_MONO compound is active in mono mode. MPK_COMPOUND_STEREO compound is active in stereo mode. MPK_COMPOUND_ASYNC compound execution is asynchronous (1). MPK_COMPOUND_ADAPTIVE compound is automatically load balanced (2). MPK_COMPOUND_NOCOPY compound and subtree pixel transfer is disabled. MPK_COMPOUND_HW use hardware for composition (3). |
mode=2D Dest. Channel Source Channel[s]
__________________________________________________________
Frame N DrawPixels[N-1] Render[N]
Render[N-1] .
. .
. .
. ReadPixels[N]
__________________________________________________________
Frame N+1 DrawPixels[N] Render[N+1]
Render[N] .
. .
. .
. ReadPixels[N+1]
|
compound operation to MPK_COMPOUND_OP_DRAW, MPK_COMPOUND_OP_CULL, MPK_COMPOUND_OP_CULLDRAW or MPK_UNDEFINED.operation is MPK_UNDEFINED, the operation is inherited from the parent compound, or set to MPK_COMPOUND_OP_CULLDRAW if compound has no parent.compound.name. This is done by copy and not by reference.split. This is done by copy and not by reference. The split string defines the tiling scheme or z-axis split for adaptive compounds. See the File Format section for the split string syntax.name. This is done by copy and not by reference. The display name is used for setting up hardware compounds to be used with Xinerama in full overlap mode. For more information about scalable graphics hardware read the MPK User's Guide.MPKChannel to be used by the passed MPKCompound for rendering. The first channel specified in the hierarchy constitutes the destination channel of the subtree below, ie. the channel conditioning the final frame.MPKChannel and relatively to its parent MPKCompound, if any.vp.eye selection of an EYE or HMD compound, one of MPK_EYE_LEFT, MPK_EYE_RIGHT or MPK_EYE_CYCLOP.eye selection of the passed MPKCompound.format of the pixels to be transferred within the MPKCompound's hierarchy. format should be a bitwise combination of MPK_COLOR_BIT, MPK_DEPTH_BIT, MPK_STENCIL_BIT.MPK_COLOR_BIT, MPK_DEPTH_BIT, MPK_STENCIL_BIT.range of the passed MPKCompound, as a fraction of its parent's range.range, relatively to its parent's range. The absolute "range" information can be retrieved by the application at rendering time via mpkChannelGetRange(), for the relevant portion of the database to be rendered accordingly.ith child of the passed MPKCompound.child to the list of children for the passed MPKCompound.child in the list of children for the passed MPKCompound and removes it from the list if it is found.name in the passed MPKCompound and returns the match if found or NULL otherwise.compound structure. Transport is done by reference and not by copy.ith frame from the compound assembly list for the current stereo eye pass. This function should only be called from the config's compound pre- or post- assemble callback. If compound mode is 2D, DB or CULL then i matches the child index responsible for the frame (e.g. the returned frame may then be NULL if both child and parent channels are identical). For other modes i should be 0.compound's current output frame. This function should only be called from the config's compound adaptive readback callback.| # compound FIELDS description | |
| name | "compound-name" |
| channel | "compound-channel's name" |
| mode | [ compound-mode description ] |
| format | [ compound-format description ] |
| split | " compound-split description " |
| # compound REGIONS description | |
| region { region-1 description } | |
| region { region-2 description } | |
| ... |
| # region FIELDS description | |
| viewport | [ xf, yf, wf, hf ] |
| range | [ minf, maxf ] |
| eye | which |
| # region CHANNEL or COMPOUND description | |
| channel | "region-channel's name" |
| compound { region-compound description } |
viewport parameters are relative to the parent compound viewport, and therefore their values should be in the range 0.0 to 1.0range parameters are relative to the parent compound range, and therefore their values should be in the range 0.0 to 1.0eye field specification accepts only the following File Format identifiers: cyclop [default], left and right.mode field specification accepts the following File Format identifiers for the mode-id: 2D, DB, 3D, FSAA, EYE, HMD, DPLEX and CULL. If none is specified, then MPK will simply synchronize the graphics update of all compound children, taking into account their respective latency. The mode's flags can be specified using the File Format identifiers ASYNC, ADAPTIVE, NOCOPY, HW, STEREO or MONO.split field specifies the tiling scheme or z-axis split used when the compound is in ADAPTIVE mode. The split value is a string, as shown in the following example:
split "[[1 | 2] - [3 | 4]]"
|
| axis x
- axis y
/ axis z
|
split "splitString" splitString : [ group axis group] group : region | splitString axis : '|' | '-' | '/' region : [ integer ] |
MPKChannel