Documentation



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

Class SbDMBuffer

Wrapper class for DMBuffers: Maintains two active buffers: working and current.

The current buffer is always available for access and contains the last complete image. The working buffer is allocatable for user/engine modification. Once released, it is made the current buffer

SbDMBuffer's are created automatically by all existing DMBufferEngines.

Note: These access buffers should be thread-safe

See Also:
SbDMBufferHelper.html
Related Man Pages:
dmbuffer
vlDMPoolGetParams
dmBufferCreatePool
dmBufferAllocate
dmICSend
dmICReceive
vlEventRecv
vlEventToDMBuffer
vlDMBufferSend
dmBufferMapData

Fields

 o stuff..
Called by SoDMBufferVideoTexture to update the contents of the current dmuGLTexture object.

Method Index

 o SbDMBuffer( Display *, const SbVec2s & )
Constructor This constructor should be called if you want the SbDMBuffer to create and manage an offscreen pbuffer. Currently unimplemented

 o SbDMBuffer( dmuGLCtx *, dmuGLTex2d * )
Constructor This constructor should be called if you have already created an instance of both a dmuGLContext and dmuTexture.

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

 o getValue( SbVec2s & )
Maps, locks, and makes current for rendering the current buffer. Provides direct access to the allocated dmuGLCtx object. (Data is modifiable)

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

 o releaseValue( )
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 &)

 o startEditing( SbVec2s &, unsigned char ** )
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 &,unsigned char **)

 o ~SbDMBuffer( )
Destructor

Methods

 o SbDMBuffer
  SbDMBuffer( Display *display, const SbVec2s &size )
	
Constructor This constructor should be called if you want the SbDMBuffer to create and manage an offscreen pbuffer. Currently unimplemented

Parameters:
display - The X display
size - The size of each pool entry

 o SbDMBuffer
  SbDMBuffer( dmuGLCtx *dmuGLContext, dmuGLTex2d *dmuObject )
	
Constructor This constructor should be called if you have already created an instance of both a dmuGLContext and dmuTexture.

Parameters:
display - The X display
size - The size of each pool entry

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

See Also:
startEditing

 o getValue
  dmuGLCtx * getValue(SbVec2s &s)
	
Maps, locks, and makes current for rendering the current buffer. Provides direct access to the allocated dmuGLCtx object. (Data is modifiable)

Parameters:
size - (Returns) Image dimensions
Returns:
The allocated dmuGLCtx
Related Man Pages:
DMbuffer

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

Parameters:
size - (Returns) Image dimensions
pixels - (Returns) Pointer to pixel data
Returns:
Pointer to pixel data
Related Man Pages:
dmBufferMapData

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

See Also:
getValue

 o startEditing
  dmuGLCtx * 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
Related Man Pages:
dmBufferAllocate
dmBufferMapData
glXMakeCurrent

 o startEditing
  unsigned char * startEditing(SbVec2s &s, unsigned char **pixels)
	
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 &,unsigned char **)

Parameters:
size - (Returns) Image dimensions
pixels - (Returns) Pointer to pixel data
Returns:
Pointer to pixel data
Related Man Pages:
dmBufferAllocate
dmBufferMapData
glXMakeCurrent

 o ~SbDMBuffer
  ~SbDMBuffer( void )
	
Destructor