Fraxinus
17.12
An IGT application
|
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) |
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 65 of file cxSharedOpenGLContext.h.
cx::SharedOpenGLContext::SharedOpenGLContext | ( | vtkOpenGLRenderWindowPtr | sharedContext | ) |
Definition at line 87 of file cxSharedOpenGLContext.cpp.
cx::SharedOpenGLContext::~SharedOpenGLContext | ( | ) |
Definition at line 92 of file cxSharedOpenGLContext.cpp.
bool cx::SharedOpenGLContext::delete1DTextureForLUT | ( | QString | image_uid | ) |
Definition at line 347 of file cxSharedOpenGLContext.cpp.
bool cx::SharedOpenGLContext::delete3DTextureForImage | ( | QString | image_uid | ) |
Definition at line 117 of file cxSharedOpenGLContext.cpp.
vtkImageDataPtr cx::SharedOpenGLContext::downloadImageFromTextureBuffer | ( | QString | image_uid | ) |
Definition at line 133 of file cxSharedOpenGLContext.cpp.
vtkTextureObjectPtr cx::SharedOpenGLContext::get1DTextureForLUT | ( | QString | image_uid | ) | const |
Definition at line 337 of file cxSharedOpenGLContext.cpp.
vtkTextureObjectPtr cx::SharedOpenGLContext::get3DTextureForImage | ( | QString | image_uid | ) | const |
Definition at line 101 of file cxSharedOpenGLContext.cpp.
int cx::SharedOpenGLContext::getNumberOfTexturesInUse | ( | ) | const |
Definition at line 169 of file cxSharedOpenGLContext.cpp.
vtkOpenGLBufferObjectPtr cx::SharedOpenGLContext::getTextureCoordinates | ( | QString | uid | ) | const |
Definition at line 402 of file cxSharedOpenGLContext.cpp.
bool cx::SharedOpenGLContext::hasUploadedImage | ( | QString | image_uid | ) | const |
Definition at line 96 of file cxSharedOpenGLContext.cpp.
bool cx::SharedOpenGLContext::hasUploadedLUT | ( | QString | image_uid | ) | const |
Definition at line 332 of file cxSharedOpenGLContext.cpp.
bool cx::SharedOpenGLContext::hasUploadedTextureCoordinates | ( | QString | uid | ) | const |
Definition at line 397 of file cxSharedOpenGLContext.cpp.
|
static |
Definition at line 60 of file cxSharedOpenGLContext.cpp.
bool cx::SharedOpenGLContext::makeCurrent | ( | ) | const |
Definition at line 163 of file cxSharedOpenGLContext.cpp.
bool cx::SharedOpenGLContext::upload3DTextureCoordinates | ( | QString | uid, |
vtkFloatArrayPtr | texture_coordinates | ||
) |
Definition at line 364 of file cxSharedOpenGLContext.cpp.
bool cx::SharedOpenGLContext::uploadImage | ( | ImagePtr | image | ) |
Definition at line 177 of file cxSharedOpenGLContext.cpp.
bool cx::SharedOpenGLContext::uploadLUT | ( | QString | imageUid, |
vtkUnsignedCharArrayPtr | lutTable | ||
) |
Definition at line 267 of file cxSharedOpenGLContext.cpp.