CustusX  2021.04.22-dev+develop.337f9
An IGT application
cx::GPUImageDataBufferImpl Class Reference
Inheritance diagram for cx::GPUImageDataBufferImpl:
cx::GPUImageDataBuffer

Public Member Functions

 GPUImageDataBufferImpl ()
 
virtual ~GPUImageDataBufferImpl ()
 
virtual int getMemorySize ()
 
virtual void SetImage (vtkImageDataPtr texture)
 
virtual unsigned int getTextureUid () const
 
virtual void allocate (int textureUnitIndex)
 
virtual void updateTexture ()
 
virtual void bind (int textureUnitIndex)
 
virtual void release ()
 
int getGLTextureForVolume (int textureUnitIndex)
 
- Public Member Functions inherited from cx::GPUImageDataBuffer
virtual ~GPUImageDataBuffer ()
 

Public Attributes

GLuint textureId
 
vtkImageDataPtr mTexture
 
bool mAllocated
 
uint64_t mMTime
 
int mMemorySize
 

Detailed Description

Helper class for sharing volume and lut buffers over several renderings

Definition at line 48 of file cxGPUImageBuffer.cpp.

Constructor & Destructor Documentation

cx::GPUImageDataBufferImpl::GPUImageDataBufferImpl ( )
inline

Definition at line 57 of file cxGPUImageBuffer.cpp.

virtual cx::GPUImageDataBufferImpl::~GPUImageDataBufferImpl ( )
inlinevirtual

Definition at line 64 of file cxGPUImageBuffer.cpp.

Member Function Documentation

virtual void cx::GPUImageDataBufferImpl::allocate ( int  textureUnitIndex)
inlinevirtual

Allocate resources for the lookup table and the volume on the GPU. Prerequisite: SetImage and SetcolorTable has been called.

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

Implements cx::GPUImageDataBuffer.

Definition at line 92 of file cxGPUImageBuffer.cpp.

virtual void cx::GPUImageDataBufferImpl::bind ( int  textureUnitIndex)
inlinevirtual

Activate and bind the volume and lut buffers inside the texture units GL_TEXTURE<2X> and GL_TEXTURE<2X+1>. Use during RenderInternal()

Implements cx::GPUImageDataBuffer.

Definition at line 197 of file cxGPUImageBuffer.cpp.

int cx::GPUImageDataBufferImpl::getGLTextureForVolume ( int  textureUnitIndex)
inline

Definition at line 215 of file cxGPUImageBuffer.cpp.

virtual int cx::GPUImageDataBufferImpl::getMemorySize ( )
inlinevirtual

Implements cx::GPUImageDataBuffer.

Definition at line 69 of file cxGPUImageBuffer.cpp.

virtual unsigned int cx::GPUImageDataBufferImpl::getTextureUid ( ) const
inlinevirtual

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

Prerequisite: allocate() has been called.

Implements cx::GPUImageDataBuffer.

Definition at line 82 of file cxGPUImageBuffer.cpp.

virtual void cx::GPUImageDataBufferImpl::release ( )
inlinevirtual

Definition at line 210 of file cxGPUImageBuffer.cpp.

virtual void cx::GPUImageDataBufferImpl::SetImage ( vtkImageDataPtr  texture)
inlinevirtual

Definition at line 74 of file cxGPUImageBuffer.cpp.

virtual void cx::GPUImageDataBufferImpl::updateTexture ( )
inlinevirtual

Definition at line 121 of file cxGPUImageBuffer.cpp.

Member Data Documentation

bool cx::GPUImageDataBufferImpl::mAllocated

Definition at line 53 of file cxGPUImageBuffer.cpp.

int cx::GPUImageDataBufferImpl::mMemorySize

Definition at line 55 of file cxGPUImageBuffer.cpp.

uint64_t cx::GPUImageDataBufferImpl::mMTime

Definition at line 54 of file cxGPUImageBuffer.cpp.

vtkImageDataPtr cx::GPUImageDataBufferImpl::mTexture

Definition at line 52 of file cxGPUImageBuffer.cpp.

GLuint cx::GPUImageDataBufferImpl::textureId

Definition at line 51 of file cxGPUImageBuffer.cpp.


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