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 {
enum  BufferAccessNature {

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


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.


See SoBufferObject for general information about buffer objects.

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





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.


The application will set the data once.


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.


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


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 


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.

size The requested size in bytes.
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 16 Sep 2021
Copyright © Thermo Fisher Scientific All rights reserved.