dmuGLPBuffer

Inherits from: dmuLatch

#include "dmuGLPBuffer.h"

Overview

The dmuGLPBuffer class is intended as a base class for any dmu object that wants to receive and manipulate DMbuffer data as an Open GL Pixel Buffer. See glXCreateGLXPbufferSGIX (3G) for more information on OGL PBuffers. This class creates a PBuffer, with no pixel area associated with it. The parameters for the PBuffer are based on the dmu constraints obtained through the dmu chain initialization (the init() process - see Overview).

As the parent of the object sends new frame data, the dmuGLPBuffer keeps a reference to the last (most recent) frame received. Access to the data is obtained through the grab() method. Grab() associates the latest frame data as the pixel area of the PBuffer (calls glXAssociateDMPbufferSGIX). This PBuffer can now be used with any Open GL operations which are valid with PBuffers (for example, defining textures, reading and writing pixels, etc.). The DMBuffer remains associated with the PBuffer, and a valid pixel store for OGL operations until release() is called on the object. Grab() is a blocking call, so you must call release() after every grab() call. Two grab calls in a row will cause indefinite blocking

This class is intended as a base class, and should not be instantiated directly. Either instantiate a class that inherits from this, or create your own subclass to gain access to the pbuffer and dmbuffers. The dmuGLTex2d object is a good example of how to create your own object that inherits from dmuGLPBuffer.

See the source code for more info and implementation details.

Public Methods


Overview    Object List     Object Hierarchy       Sample Apps