Fraxinus  18.10
An IGT application
cx::GPUImageDataBuffer Class Referenceabstract

Helper class for sharing GPU memory over several Views (GL contexts). More...

#include <cxGPUImageBuffer.h>

Inheritance diagram for cx::GPUImageDataBuffer:
cx::GPUImageDataBufferImpl

Public Member Functions

virtual ~GPUImageDataBuffer ()
 
virtual void allocate (int textureUnitIndex)=0
 
virtual void bind (int textureUnitIndex)=0
 
virtual int getMemorySize ()=0
 
virtual unsigned int getTextureUid () const =0
 

Detailed Description

Helper class for sharing GPU memory over several Views (GL contexts).

This one stores 3D volume texture in the form of a vtkImageDataPtr

Definition at line 39 of file cxGPUImageBuffer.h.

Constructor & Destructor Documentation

virtual cx::GPUImageDataBuffer::~GPUImageDataBuffer ( )
inlinevirtual

Definition at line 42 of file cxGPUImageBuffer.h.

Member Function Documentation

virtual void cx::GPUImageDataBuffer::allocate ( int  textureUnitIndex)
pure virtual

Allocate resources for the volume on the GPU.

Call this from inside a PrepareForRendering() method in vtk.

Implemented in cx::GPUImageDataBufferImpl.

virtual void cx::GPUImageDataBuffer::bind ( int  textureUnitIndex)
pure virtual

Assuming imageData is changed, send vtkImageData to GPU.Activate and bind the volume and lut buffers inside the texture units GL_TEXTURE<2X> and GL_TEXTURE<2X+1>. Use during RenderInternal()

Implemented in cx::GPUImageDataBufferImpl.

virtual int cx::GPUImageDataBuffer::getMemorySize ( )
pure virtual

Implemented in cx::GPUImageDataBufferImpl.

virtual unsigned int cx::GPUImageDataBuffer::getTextureUid ( ) const
pure virtual

Return the texture uid for this object, as generated by glGenTextures().

Prerequisite: allocate() has been called.

Implemented in cx::GPUImageDataBufferImpl.


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