Fraxinus  18.10
An IGT application
cx::SharedOpenGLContext Class Reference

Shared OpenGL context. More...

#include <cxSharedOpenGLContext.h>

Public Member Functions

 SharedOpenGLContext (vtkOpenGLRenderWindowPtr sharedContext)
 
 ~SharedOpenGLContext ()
 
bool makeCurrent () const
 
int getNumberOfTexturesInUse () const
 
bool uploadImage (ImagePtr image)
 
bool hasUploadedImage (QString image_uid) const
 
vtkTextureObjectPtr get3DTextureForImage (QString image_uid) const
 
bool delete3DTextureForImage (QString image_uid)
 
bool uploadLUT (QString imageUid, vtkUnsignedCharArrayPtr lutTable)
 
bool hasUploadedLUT (QString image_uid) const
 
vtkTextureObjectPtr get1DTextureForLUT (QString image_uid) const
 
bool delete1DTextureForLUT (QString image_uid)
 
bool upload3DTextureCoordinates (QString uid, vtkFloatArrayPtr texture_coordinates)
 
bool hasUploadedTextureCoordinates (QString uid) const
 
vtkOpenGLBufferObjectPtr getTextureCoordinates (QString uid) const
 
vtkImageDataPtr downloadImageFromTextureBuffer (QString image_uid)
 

Static Public Member Functions

static bool isValid (vtkOpenGLRenderWindowPtr opengl_renderwindow, bool print=false)
 

Detailed Description

Shared OpenGL context.

CX use a shared OpenGL context for all render windows. This is a hack added to our branch of VTK. See vtkXOpenGLRenderWindow (Linux), vtkCocoaRenderWindow (Mac), and "vtkSomething" (Windows)

There exist only one shared OpenGL context, and this is set to be the id of the first context created by vtkRenderWindow. All vtkRenderWindows created gets this shared context. This means that the first vtkRenderWindow MUST NOT be deleted, as it contains THE OpenGL context.

Definition at line 44 of file cxSharedOpenGLContext.h.

Constructor & Destructor Documentation

cx::SharedOpenGLContext::SharedOpenGLContext ( vtkOpenGLRenderWindowPtr  sharedContext)

Definition at line 66 of file cxSharedOpenGLContext.cpp.

cx::SharedOpenGLContext::~SharedOpenGLContext ( )

Definition at line 71 of file cxSharedOpenGLContext.cpp.

Member Function Documentation

bool cx::SharedOpenGLContext::delete1DTextureForLUT ( QString  image_uid)

Definition at line 326 of file cxSharedOpenGLContext.cpp.

bool cx::SharedOpenGLContext::delete3DTextureForImage ( QString  image_uid)

Definition at line 96 of file cxSharedOpenGLContext.cpp.

vtkImageDataPtr cx::SharedOpenGLContext::downloadImageFromTextureBuffer ( QString  image_uid)

Definition at line 112 of file cxSharedOpenGLContext.cpp.

vtkTextureObjectPtr cx::SharedOpenGLContext::get1DTextureForLUT ( QString  image_uid) const

Definition at line 316 of file cxSharedOpenGLContext.cpp.

vtkTextureObjectPtr cx::SharedOpenGLContext::get3DTextureForImage ( QString  image_uid) const

Definition at line 80 of file cxSharedOpenGLContext.cpp.

int cx::SharedOpenGLContext::getNumberOfTexturesInUse ( ) const

Definition at line 148 of file cxSharedOpenGLContext.cpp.

vtkOpenGLBufferObjectPtr cx::SharedOpenGLContext::getTextureCoordinates ( QString  uid) const

Definition at line 381 of file cxSharedOpenGLContext.cpp.

bool cx::SharedOpenGLContext::hasUploadedImage ( QString  image_uid) const

Definition at line 75 of file cxSharedOpenGLContext.cpp.

bool cx::SharedOpenGLContext::hasUploadedLUT ( QString  image_uid) const

Definition at line 311 of file cxSharedOpenGLContext.cpp.

bool cx::SharedOpenGLContext::hasUploadedTextureCoordinates ( QString  uid) const

Definition at line 376 of file cxSharedOpenGLContext.cpp.

bool cx::SharedOpenGLContext::isValid ( vtkOpenGLRenderWindowPtr  opengl_renderwindow,
bool  print = false 
)
static

Definition at line 39 of file cxSharedOpenGLContext.cpp.

bool cx::SharedOpenGLContext::makeCurrent ( ) const

Definition at line 142 of file cxSharedOpenGLContext.cpp.

bool cx::SharedOpenGLContext::upload3DTextureCoordinates ( QString  uid,
vtkFloatArrayPtr  texture_coordinates 
)

Definition at line 343 of file cxSharedOpenGLContext.cpp.

bool cx::SharedOpenGLContext::uploadImage ( ImagePtr  image)

Definition at line 156 of file cxSharedOpenGLContext.cpp.

bool cx::SharedOpenGLContext::uploadLUT ( QString  imageUid,
vtkUnsignedCharArrayPtr  lutTable 
)

Definition at line 246 of file cxSharedOpenGLContext.cpp.


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