VTK
vtkOpenGLContextBufferId.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLContextBufferId.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
24 #ifndef vtkOpenGLContextBufferId_h
25 #define vtkOpenGLContextBufferId_h
26 
27 #include "vtkRenderingContextOpenGL2Module.h" // For export macro
29 
30 class vtkTextureObject;
32 
33 class VTKRENDERINGCONTEXTOPENGL2_EXPORT vtkOpenGLContextBufferId : public vtkAbstractContextBufferId
34 {
35 public:
37  virtual void PrintSelf(ostream &os, vtkIndent indent);
38 
41 
44  virtual void ReleaseGraphicsResources();
45 
47 
48  virtual void SetContext(vtkRenderWindow *context);
51 
54  virtual bool IsSupported();
55 
59  virtual void Allocate();
60 
62  virtual bool IsAllocated() const;
63 
65 
68  virtual void SetValues(int srcXmin,
69  int srcYmin);
71 
76  virtual vtkIdType GetPickedItem(int x, int y);
77 
78 protected:
81 
82  vtkOpenGLRenderWindow *Context;
83  vtkTextureObject *Texture;
84 
85 private:
86  vtkOpenGLContextBufferId(const vtkOpenGLContextBufferId &); // Not implemented.
87  void operator=(const vtkOpenGLContextBufferId &); // Not implemented.
88 };
89 
90 #endif // #ifndef vtkOpenGLContextBufferId_h
vtkAbstractContextBufferId.h
vtkOpenGLContextBufferId::~vtkOpenGLContextBufferId
virtual ~vtkOpenGLContextBufferId()
vtkOpenGLContextBufferId::IsAllocated
virtual bool IsAllocated() const
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkOpenGLContextBufferId::New
static vtkOpenGLContextBufferId * New()
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkAbstractContextBufferId
2D array of ids, used for picking.
Definition: vtkAbstractContextBufferId.h:46
vtkOpenGLContextBufferId::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkOpenGLContextBufferId::Allocate
virtual void Allocate()
vtkOpenGLContextBufferId::SetValues
virtual void SetValues(int srcXmin, int srcYmin)
vtkOpenGLContextBufferId::vtkOpenGLContextBufferId
vtkOpenGLContextBufferId()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkTextureObject
abstracts an OpenGL texture object.
Definition: vtkTextureObject.h:40
vtkOpenGLContextBufferId::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources()
vtkOpenGLContextBufferId
2D array of ids stored in VRAM.
Definition: vtkOpenGLContextBufferId.h:34
vtkOpenGLContextBufferId::SetContext
virtual void SetContext(vtkRenderWindow *context)
vtkOpenGLContextBufferId::IsSupported
virtual bool IsSupported()
vtkgl::y
GLint GLint GLint GLint GLint GLint y
Definition: vtkgl.h:11318
vtkOpenGLContextBufferId::GetContext
virtual vtkRenderWindow * GetContext()
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:41
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:89
vtkOpenGLContextBufferId::GetPickedItem
virtual vtkIdType GetPickedItem(int x, int y)