Multipipe SDK 3.2 Reference

Name

MPKGlobal - MPKGlobal functional interface.

Header File

#include <mpk/global.h>

Synopsis

void mpkInit(void );
void mpkExit(void );
void mpkGlobalOutput(int tab);
const char* mpkGetString(int name);

Execution Mode

void mpkGlobalSetExecutionMode(int mode);
int mpkGlobalGetExecutionMode(void );

Arena Attributes

void mpkGlobalSetArenaAttributei(int aattr, int val);
int mpkGlobalGetArenaAttributei(int aattr);
void mpkGlobalSetArenaPath(const char* path);
const char* mpkGlobalGetArenaPath(void );

Global Attributes

void mpkGlobalSetAttributei(int attr, int val);
int mpkGlobalGetAttributei(int attr);
void mpkGlobalSetAttributef(int attr, float val);
float mpkGlobalGetAttributef(int attr);

Pipe Attributes

void mpkGlobalSetPipeAttributei(int pattr, int val);
int mpkGlobalGetPipeAttributei(int pattr);

Window Attributes

void mpkGlobalSetWindowAttributei(int wattr, int val);
int mpkGlobalGetWindowAttributei(int wattr);

Channel Attributes

void mpkGlobalSetChannelAttributei(int cattr, int val);
int mpkGlobalGetChannelAttributei(int cattr);
void mpkGlobalSetChannelAttributef(int cattr, float val);
float mpkGlobalGetChannelAttributef(int cattr);

Description

The MPKGlobal data structure specifies OpenGL Multipipe SDK default attribute values. Execution Mode and MPKArena attributes are not accessible via the File Format interface.

Function descriptions


mpkInit initializes internal OpenGL Multipipe SDK data structures and must be the first OpenGL Multipipe SDK call in an application except for the following:


mpkExit exits OpenGL Multipipe SDK.

mpkGlobalOutput outputs the MPKGlobal attributes which have been set, either by default or by the application. tab specifies the number of tabulations to be applied for the left margin.

mpkGetString returns a pointer to a static string describing some aspect of the current OpenGL Multipipe SDK library. name can be one of the following:

Execution Mode

mpkGlobalSetExecutionMode sets the execution mode of an OpenGL Multipipe SDK application to either MPK_EXECUTION_PTHREAD, MPK_EXECUTION_SPROC, MPK_EXECUTION_FORK or MPK_EXECUTION_PERFORMER.

mpkGlobalGetExecutionMode returns the application's execution mode.
Arena Attributes

The following functions will not have any effect unless the execution mode is set to MPK_EXECUTION_SPROC, MPK_EXECUTION_FORK or MPK_EXECUTION_PERFORMER in which case mpkInit() creates an internal shared arena matching the specified attributes.

mpkGlobalSetArenaAttributei sets the value of the passed MPKArena attribute. Default values are set for MPK_AATTR_SIZE (2^28) and MPK_AATTR_USERS (100).

mpkGlobalGetArenaAttributei returns the value of the specified MPKArena attribute, or MPK_UNDEFINED if this value has not been set.

mpkGlobalSetArenaPath specifies the path to a directory where the application has read-write permission for mpkInit() to create the MPKArena. Default path is "/usr/tmp".

mpkGlobalGetArenaPath returns the path to the arena.
Global Attributes

mpkGlobalSetAttributei sets the specified attribute. The following symbols are accepted for attr:

MPK_TIMER_SIGNAL[int] Specifies the signal which is used as the notification mechanism by a timer when firing. The default value is SIGALRM. Alter this value if you already make use of the particular signal in your application.
 
MPK_XINERAMA[bool] Setting this variable to 0 enables MPK to perform faster window creation, in case no "Xinerama-aware" windows are used. Note that setting this variable to 0 while using "Xinerama_aware" windows might cause unpredictible results. The default value is 1.
 
MPK_CHANNEL_AUTO_ACTIVATE[bool] Enables or disables the channel auto activation feature. If enabled, MPK automatically creates a compound for each channel not referenced by an existing compound during mpkConfigInit(). Therefore, unused channels are automatically actived. The default value is 1 (enabled).
 
MPK_DEFAULT_RUNON_POLICY[bool] Sets the default thread runon policy which applies to windows which have an unspecified runon value. Accepted values are MPK_RUNON_FREE and MPK_RUNON_AUTO. The default value is MPK_RUNON_FREE.
 
MPK_CONFIG_FRAME_CACHE_SIZE[int] Specifies the cache size for the config frame data queue used for culling. This attribute influences the granularity and performance of the data processing for data passed using mpkConfigFrameData(). The default value is 100.
 
MPK_CHANNEL_PASS_CACHE_SIZE[int] Specifies the cache size for the frame data queues used for culling. This attribute influences the granularity and performance of the data processing for data passed using mpkChannelPassData(). The default value is 50.
 
MPK_CHANNEL_PUT_CACHE_SIZE[int] Specifies the cache size for the culling data queues. This attribute influences the granularity and performance of the data processing for data passed using mpkChannelPutData(). The default value is 10.

mpkGlobalGetAttributei returns the value of the specified attribute, or MPK_UNDEFINED if this value has not been set.

mpkGlobalSetAttributef sets the specified attribute. The following symbols are accepted for attr:

MPK_DEFAULT_EYE_OFFSETSpecifies the default value of the eye offset used by MPKChannel frustum computations. The default value is 0.035

mpkGlobalGetAttributef returns the value of the specified attribute.
Pipe Attributes

mpkGlobalSetPipeAttributei sets the default values for the specified MPKPipe attribute. The following symbols are accepted for pattr:

MPK_PATTR_MONO_WIDTH[int] Specifies the MPKPipe width in mono display mode.
 
MPK_PATTR_MONO_HEIGHT[int] Specifies the MPKPipe height in mono display mode.
 
MPK_PATTR_STEREO_TYPE[int] Specifies the MPKPipe stereo type. Accepted values are MPK_STEREO_USER, MPK_STEREO_QUAD, MPK_STEREO_RECT, MPK_STEREO_TOP, MPK_STEREO_BOT.
 
MPK_PATTR_STEREO_WIDTH[int] Specifies the MPKPipe width in stereo display mode.
 
MPK_PATTR_STEREO_HEIGHT[int] Specifies the MPKPipe height in stereo display mode.
 
MPK_PATTR_STEREO_OFFSET[int] Specifies the MPKPipe stereo offset for MPK_STEREO_TOP and MPK_STEREO_BOT stereo modes.

mpkGlobalGetPipeAttributei returns the value of the specified Pipe attribute, or MPK_UNDEFINED if this value has not been set.
Window Attributes

mpkGlobalSetWindowAttributei sets the default values for the specified MPKWindow attribute. The following symbols are accepted for wattr:

MPK_WATTR_HINTS_VISUAL[enum] Specifies the MPKWindow visual type. Accepted values are MPK_GLX_TRUE_COLOR, MPK_GLX_PSEUDO_COLOR, MPK_GLX_DIRECT_COLOR, MPK_GLX_STATIC_COLOR, MPK_GLX_GRAYSCALE, MPK_GLX_STATIC_GRAY
 
MPK_WATTR_HINTS_DRAWABLE[enum] Specifies the MPKWindow drawable type. Accepted values are MPK_GLX_WINDOW, MPK_GLX_PBUFFER, MPK_GLX_PIXMAP
 
MPK_WATTR_HINTS_CAVEAT[enum] Specifies the caveats associated with the MPKWindow framebuffer configuration. Accepted values are MPK_GLX_SLOW, MPK_GLX_NOCAVEAT, MPK_GLX_NON_CONFORMANT
 
MPK_WATTR_HINTS_X_RENDERABLE[bool] Specifies whether only frame-buffer configuration that have associated X visuals (and can be used to render to Windows and/or GLX pixmaps) should be considered.
 
MPK_WATTR_HINTS_DIRECT[bool] Specifies whether the MPKWindow GLXContext should be direct.
 
MPK_WATTR_HINTS_DECORATION[bool] Specifies whether the Window should have MOTIF decorations.
 
MPK_WATTR_HINTS_MOVE[bool] Specifies whether the window can be moved via mwm/4Dwm, or not.
 
MPK_WATTR_HINTS_RESIZE[bool] Specifies whether the window can be resized or not.
 
MPK_WATTR_HINTS_ASPECT[bool] Specifies whether a fixed window aspect ratio is enforced.
 
MPK_WATTR_HINTS_MINMAX[bool] Specifies whether the window can be minimized/maximized via mwm/4Dwm.
 
MPK_WATTR_HINTS_OVERRIDEREDIRECT[bool] Specifies whether the window has the override_redirect attribute set at creation time.
 
MPK_WATTR_HINTS_RGBA[bool] Specifies whether MPKWindow visuals should support RGBA rendering mode. The default value is 1. (true).
 
MPK_WATTR_HINTS_DOUBLEBUFFER[bool] Specifies whether the MPKWindow frame buffer configuration should be double-buffered. Note that setting this attribute on a created MPKWindow will affect the behaviour of mpkWindowSwapBuffers. The default value is 1 (true).
 
MPK_WATTR_HINTS_STEREO[bool] Specifies whether the MPKWindow frame buffer configuration should support quad-buffer stereo.
 
MPK_WATTR_HINTS_TRANSPARENT[bool] Specifies whether the MPKWindow frame buffer configuration should be transparent.
 
MPK_WATTR_HINTS_LARGEST[bool] Specifies whether the largest available pbuffer should be obtained, if the allocation requested by the window size would have failed. The width and height of the allocated pixel buffer will never exceed the specified window width or height, respectively. This attribute will be ignored by MPKWindows for which the DRAWABLE hint is not set to MPK_GLX_PBUFFER.
 
MPK_WATTR_HINTS_PRESERVED[bool] Specifies whether the contents of the pixel buffer should be preserved when a resource conflict occurs. This attribute will be ignored by MPKWindows for which the DRAWABLE hint is not set to MPK_GLX_PBUFFER.
 
MPK_WATTR_HINTS_THREAD[bool] Specifies whether the MPKWindow should be made a separate thread from the application.
 
MPK_WATTR_HINTS_XINERAMA[bool] Specifies whether the MPKWindow should use Xinerama(1) or be "Xinerama-aware"(0).
 
MPK_WATTR_PLANES_LEVEL[int] Specifies the MPKWindow buffer level. The default value is 0.
 
MPK_WATTR_PLANES_AUX[int] Specifies the number of auxiliary buffers.
 
MPK_WATTR_PLANES_DEPTH[int] Specifies the minimum size of the depth buffer. The default value is 1.
 
MPK_WATTR_PLANES_STENCIL[int] Specifies the minimum size of the stencil buffer.
 
MPK_WATTR_PLANES_SAMPLES[int] Specifies the minimum number of samples required in the multisample buffer.
 
MPK_WATTR_PLANES_COLOR[int] Specifies the minimum color index buffer size. This attribute is ignored if the RGBA hint of the MPKWindow is set to 1.
 
MPK_WATTR_PLANES_RED[int] Specifies the minimum number of red bitplanes. This attribute is ignored if the RGBA hint of the MPKWindow is not set. The default value is 1.
 
MPK_WATTR_PLANES_GREEN[int] Specifies the minimum number of green bitplanes. This attribute is ignored if the RGBA hint of the MPKWindow is not set. The default value is 1.
 
MPK_WATTR_PLANES_BLUE[int] Specifies the minimum number of blue bitplanes. This attribute is ignored if the RGBA hint of the MPKWindow is not set. The default value is 1.
 
MPK_WATTR_PLANES_ALPHA[int] Specifies the minimum number of alpha bitplanes. This attribute is ignored if the RGBA hint of the MPKWindow is not set. The default value is 0.
 
MPK_WATTR_PLANES_ACCUM_RED[int] Specifies the minimum number of accumulation red bitplanes. This attribute is ignored if the RGBA hint of the MPKWindow is not set.
 
MPK_WATTR_PLANES_ACCUM_GREEN[int] Specifies the minimum number of accumulation green bitplanes. This attribute is ignored if the RGBA hint of the MPKWindow is not set.
 
MPK_WATTR_PLANES_ACCUM_BLUE[int] Specifies the minimum number of accumulation blue bitplanes. This attribute is ignored if the RGBA hint of the MPKWindow is not set.
 
MPK_WATTR_PLANES_ACCUM_ALPHA[int] Specifies the minimum number of accumulation alpha bitplanes. This attribute is ignored if the RGBA hint of the MPKWindow is not set.
 
MPK_WATTR_TRANSPARENT_RED[int] Specifies the red component of the MPKWindow transparent color. This attribute is ignored if the RGBA hint of the MPKWindow is not set, or if the TRANSPARENT hint of the MPKWindow is not set.
 
MPK_WATTR_TRANSPARENT_GREEN[int] Specifies the green component of the MPKWindow transparent color. This attribute is ignored if the RGBA hint of the MPKWindow is not set, or if the TRANSPARENT hint of the MPKWindow is not set.
 
MPK_WATTR_TRANSPARENT_BLUE[int] Specifies the blue component of the MPKWindow transparent color. This attribute is ignored if the RGBA hint of the MPKWindow is not set, or if the TRANSPARENT hint of the MPKWindow is not set.
 
MPK_WATTR_TRANSPARENT_ALPHA[int] Specifies the alpha component of the MPKWindow transparent color. This attribute is ignored if the RGBA hint of the MPKWindow is not set, or if the TRANSPARENT hint of the MPKWindow is not set.
 
MPK_WATTR_TRANSPARENT_INDEX[int] Specifies the MPKWindow transparent index. This attribute is ignored if the RGBA hint of the MPKWindow is set, or if the TRANSPARENT hint of the MPKWindow is not set.

More information about GLX visual attributes specifications can be found in the glXChooseFBConfig(3G) and glXChooseVisual(3G) man pages.

mpkGlobalGetWindowAttributei returns the value of the specified MPKWindow attribute, or MPK_UNDEFINED if this value has not been set.
Channel Attributes

mpkGlobalSetChannelAttributei sets the default values for the specified MPKChannel attribute. Note that not all format, type combinations are valid. Please refer to the glReadPixels man page for detailed information about accepted combinations. The following symbols are accepted for cattr:

MPK_CATTR_READ_COLOR_FORMAT[enum] Specifies the default MPKFrame format used by the MPKChannel to read color pixel data. Accepted values are GL_RGBA, GL_RGB, GL_BGRA, GL_BGR, GL_ABGR_EXT, GL_COLOR_INDEX, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA
 
MPK_CATTR_READ_COLOR_TYPE[enum] Specifies the default MPKFrame type used by the MPKChannel to read color pixel data. Accepted values are GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_BITMAP, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV
 
MPK_CATTR_READ_DEPTH_FORMAT[enum] Specifies the default MPKFrame format used by the MPKChannel to read depth pixel data. Accepted values are GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT24_SGIX
 
MPK_CATTR_READ_DEPTH_TYPE[enum] Specifies the default MPKFrame type used by the MPKChannel to read depth pixel data. Accepted values are GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT
 
MPK_CATTR_READ_STENCIL_FORMAT[enum] Specifies the default MPKFrame format used by the MPKChannel to read stencil pixel data. Accepted values are GL_STENCIL_INDEX
 
MPK_CATTR_READ_STENCIL_TYPE[enum] Specifies the default MPKFrame type used by the MPKChannel to read stencil pixel data. Accepted values are GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_BITMAP

mpkGlobalGetChannelAttributei returns the value of the specified MPKChannel attribute, or MPK_UNDEFINED if this value has not been set.

mpkGlobalSetChannelAttributef currently only sets the default near and far distances of the MPKChannel. These values are preempted by mpkChannelSetNearFar().

mpkGlobalGetChannelAttributef returns the value of the specified MPKChannel attribute.

File Format/Defaults

global {
 MPK_DEFAULT_EYE_OFFSET 0.035
 MPK_XINERAMA 1
 MPK_CATTR_NEAR 0.01
 MPK_CATTR_FAR 100.
 
 MPK_PATTR_STEREO_HEIGHT 492
 MPK_PATTR_STEREO_OFFSET 532
 
 MPK_WATTR_HINTS_THREAD 1
 
 MPK_WATTR_HINTS_RGBA 1
 MPK_WATTR_HINTS_DOUBLEBUFFER 1
 MPK_WATTR_PLANES_LEVEL 0
 MPK_WATTR_PLANES_DEPTH 1
 MPK_WATTR_PLANES_RED 1
 MPK_WATTR_PLANES_GREEN 1
 MPK_WATTR_PLANES_BLUE 1
 MPK_WATTR_PLANES_ALPHA 0

}

Notes

MPK_WATTR_HINTS_DRAWABLE description accepts only the following File Format identifiers : none, window [default], pbuffer and pixmap.

MPK_WATTR_HINTS_CAVEAT description accepts only the following File Format identifiers : none [default], slow and non-conformant.

MPK_WATTR_HINTS_VISUAL description accepts only the following File Format identifiers : true-color [default], pseudo-color, direct-color, static-color, static-gray or grayscale.