Documentation



Developed by The Demo Factory:
Kevin Brunner
, Tim Davison,
Ed Allard, Bob Penrod

Class SoSFDMBufferImage:

A field containing an SbDMBuffer. The SoSFDMBufferImage does not create or manage an SbDMBuffer; it simply provides access to an assigned SbDMBuffer. Classes which wish to have an SoSFDMBufferImage field, must initialize its contents with a call to setValue().

Once initialized, the contents of this field may be fetched by using one of three access methods: getImage (overloaded twice) or getBuffer. Once the contents of the field have been used (e.g. a call has been made to glXAssociateDMPbufferSGIX or glDrawPixels) the image should be released -- DMbuffers typically have highly dynamic contents, releasing an SoSFDMBufferImage makes it's associated DMBufferpool entry available for use again.

This field can also be used to drive DMbufferpools by allocating a buffer from the pool for rendering. This is a three step process: a call is made to startEditing reserving an SbDMBuffer working the image is rendered to the returned pixel data pointer, and a call is made to finishEditing which frees any previous data and makes avialable the newly rendered content.

See Also:
SbDMBuffer.html
Related Man Pages:
SoTexture2
SoSFImage
dmbuffer

Method Index

 o finishEditing( )
Releases the lock from a prvious call to startEditing making the working buffer the current buffer.

 o getBuffer( SbVec2s & )
Maps and locks the current buffer and returns a pointer to the SbDMBuffer. (Data is modifiable)

 o getImage( )
Maps and locks the current buffer and returns a pointer to its data. (Data is modifiable)

 o getImage( SbVec2s & )
Maps and locks the current buffer and returns a pointer to its data. (Data is modifiable)

 o release( )
Releases the lock from a previous call to getValue

 o startEditing( SbVec2s & )
Allocates, Maps, locks, and makes current for rendering the working buffer. Providing direct access to a newly allocated DMbuffer from the buffer pool.

Until allocatable SbDMBuffer's are implemented, this is essentially the same as getValue(SbVec2s &)

Methods

 o finishEditing
  void finishEditing( void )
	
Releases the lock from a prvious call to startEditing making the working buffer the current buffer.

See Also:
startEditing
SbDMBufferfinishEditing

 o getBuffer
  SbDMBuffer * getBuffer( SbVec2s &size )
	
Maps and locks the current buffer and returns a pointer to the SbDMBuffer. (Data is modifiable)

Parameters:
size - (Returns) Image dimensions
Returns:
Pointer to the SbDMBuffer
See Also:
getValue (SbDMBuffer)

 o getImage
  const unsigned char * getImage( void )
	
Maps and locks the current buffer and returns a pointer to its data. (Data is modifiable)

Returns:
Pointer to pixel data
See Also:
getValue (SbDMBuffer)

 o getImage
  const unsigned char * getImage(SbVec2s &size)
	
Maps and locks the current buffer and returns a pointer to its data. (Data is modifiable)

Parameters:
size - (Returns) Image dimensions
Returns:
Pointer to pixel data
See Also:
getValue (SbDMBuffer)

 o release
  void release( void )
	
Releases the lock from a previous call to getValue

See Also:
getValue
releaseValue (SbDMBuffer)

 o startEditing
  SbDMBuffer * startEditing(SbVec2s &s)
	
Allocates, Maps, locks, and makes current for rendering the working buffer. Providing direct access to a newly allocated DMbuffer from the buffer pool.

Until allocatable SbDMBuffer's are implemented, this is essentially the same as getValue(SbVec2s &)

Parameters:
size - (Returns) Image dimensions
Returns:
The allocated dmuGLCtx
See Also:
SbDMBufferstartEditing
Related Man Pages:
dmBufferAllocate
dmBufferMapData
glXMakeCurrent