SoGpuBufferObject Class Reference
[CPU device]

VSG extension GPU buffer object class More...

#include <Inventor/devices/SoGpuBufferObject.h>

Inheritance diagram for SoGpuBufferObject:
SoBufferObject SoRefCounter SoTypedObject

List of all members.

Public Types

enum  BufferAccessFrequency {
  STATIC,
  DYNAMIC
}
enum  BufferAccessNature {
  SHARED,
  DEVICE
}

Public Member Functions

 SoGpuBufferObject (BufferAccessFrequency accessFrequency=STATIC, BufferAccessNature accessNature=SHARED)
virtual bool setSize (size_t size)
virtual SoBufferObjectcreateInstance () const
virtual void clearInstance ()
BufferAccessFrequency getAccessFrequency () const
BufferAccessNature getAccessNature () const

Friends

struct inventor::renderer::Resource< SoBufferObject >

Detailed Description

VSG extension GPU buffer object class

This class provides management functions for GPU memory buffers.

Note: Since Open Inventor 10.4, applications should use SoGPUBufferObject, instead of SoGLBufferObject, in most cases. For example to store vertex data in GPU memory for use with SoBufferedShape or SoVertexShaderParameterBufferObject.

See SoBufferObject for general information about buffer objects.

NOTES:

See SoBufferObject for general information about buffer objects.

See SoBufferedShape for an example of storing vertices in a GPU buffer.

EXAMPLE

EXAMPLE

SEE ALSO

SoCpuBufferObject

NOTE: Class available since Open Inventor 10.0.

See related examples:

BufferedShapePicking, GPUGeometry, InterleavedVertexAttribFeedback, SimpleVertexAttribFeedback, VertexAttribFeedback


Member Enumeration Documentation

Available values for hints on how frequently the application will be changing the buffer's data.

Enumerator:
STATIC 

The application will set the data once.

DYNAMIC 

The application will set the data multiple times.

Available values for hints on the nature of the application's access to the buffer.

They indicate whether the application will be directly reading or writing the buffer's data.

Enumerator:
SHARED 

The application will be writing data to the buffer, but will not read it.

DEVICE 

The application will be neither writing nor reading the data.

Only GPU commands will interact with the buffer. This is typically used when a buffer object is used to pass data from one place to another on GPU side.


Constructor & Destructor Documentation

SoGpuBufferObject::SoGpuBufferObject ( BufferAccessFrequency  accessFrequency = STATIC,
BufferAccessNature  accessNature = SHARED 
)

Constructor.

Parameters:
accessFrequency The intended access frequency of this buffer. Use enum BufferAccessFrequency
accessNature The intended access nature of this buffer. Use enum BufferAccessNature

Member Function Documentation

virtual void SoGpuBufferObject::clearInstance (  )  [virtual]

This function clears the content of the buffer, it frees the memory if the mode was COPY.

Implements SoBufferObject.

virtual SoBufferObject* SoGpuBufferObject::createInstance (  )  const [virtual]

Create a new buffer with the same properties as the current one.


The new instance will have the same context or device properties, but no memory is allocated.

Implements SoBufferObject.

BufferAccessFrequency SoGpuBufferObject::getAccessFrequency (  )  const

Returns the current buffer access frequency hint for this buffer object.

BufferAccessNature SoGpuBufferObject::getAccessNature (  )  const

Returns the current buffer access nature hint for this buffer object.

virtual bool SoGpuBufferObject::setSize ( size_t  size  )  [virtual]

Sets the size in bytes of the buffer object.
If the requested size is the same as the current size, this method does nothing and returns true. If there is existing memory that is owned by the buffer object, that memory is released. If the requested size is zero, the buffer object is now empty.

Parameters:
size The requested size in bytes.
Returns:
true if the operation was successful.

Reimplemented from SoBufferObject.


Friends And Related Function Documentation

friend struct inventor::renderer::Resource< SoBufferObject > [friend]

The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/