CustusX  16.5.0-rc9
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 ()
 
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 69 of file cxGPUImageBuffer.cpp.

Constructor & Destructor Documentation

cx::GPUImageDataBufferImpl::GPUImageDataBufferImpl ( )
inline

Definition at line 78 of file cxGPUImageBuffer.cpp.

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

Definition at line 85 of file cxGPUImageBuffer.cpp.

Member Function Documentation

virtual void cx::GPUImageDataBufferImpl::allocate ( )
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 113 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 206 of file cxGPUImageBuffer.cpp.

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

Definition at line 224 of file cxGPUImageBuffer.cpp.

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

Implements cx::GPUImageDataBuffer.

Definition at line 90 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 103 of file cxGPUImageBuffer.cpp.

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

Definition at line 219 of file cxGPUImageBuffer.cpp.

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

Definition at line 95 of file cxGPUImageBuffer.cpp.

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

Definition at line 134 of file cxGPUImageBuffer.cpp.

Member Data Documentation

bool cx::GPUImageDataBufferImpl::mAllocated

Definition at line 74 of file cxGPUImageBuffer.cpp.

int cx::GPUImageDataBufferImpl::mMemorySize

Definition at line 76 of file cxGPUImageBuffer.cpp.

uint64_t cx::GPUImageDataBufferImpl::mMTime

Definition at line 75 of file cxGPUImageBuffer.cpp.

vtkImageDataPtr cx::GPUImageDataBufferImpl::mTexture

Definition at line 73 of file cxGPUImageBuffer.cpp.

GLuint cx::GPUImageDataBufferImpl::textureId

Definition at line 72 of file cxGPUImageBuffer.cpp.


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