VTK  9.0.1
vtkOpenGLRenderWindow.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLRenderWindow.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 =========================================================================*/
25 #ifndef vtkOpenGLRenderWindow_h
26 #define vtkOpenGLRenderWindow_h
27 
28 #include "vtkRect.h" // for vtkRecti
29 #include "vtkRenderWindow.h"
30 #include "vtkRenderingOpenGL2Module.h" // For export macro
31 #include "vtkType.h" // for ivar
32 #include <map> // for ivar
33 #include <set> // for ivar
34 #include <string> // for ivar
35 
36 class vtkIdList;
39 class vtkOpenGLHardwareSupport;
43 class vtkShaderProgram;
44 class vtkStdString;
45 class vtkTexture;
46 class vtkTextureObject;
49 class vtkOpenGLState;
50 
51 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLRenderWindow : public vtkRenderWindow
52 {
53 public:
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
60  void Start(void) override;
61 
66  void Frame() override;
67 
71  const char* GetRenderingBackend() override;
72 
74 
80 
82 
85  unsigned char* GetPixelData(int x, int y, int x2, int y2, int front, int right) override;
87  int x, int y, int x2, int y2, int front, vtkUnsignedCharArray* data, int right) override;
89  int x, int y, int x2, int y2, unsigned char* data, int front, int right) override;
91  int x, int y, int x2, int y2, vtkUnsignedCharArray* data, int front, int right) override;
93 
95 
98  float* GetRGBAPixelData(int x, int y, int x2, int y2, int front, int right = 0) override;
100  int x, int y, int x2, int y2, int front, vtkFloatArray* data, int right = 0) override;
102  int x, int y, int x2, int y2, float* data, int front, int blend = 0, int right = 0) override;
103  int SetRGBAPixelData(int x, int y, int x2, int y2, vtkFloatArray* data, int front, int blend = 0,
104  int right = 0) override;
105  void ReleaseRGBAPixelData(float* data) override;
106  unsigned char* GetRGBACharPixelData(
107  int x, int y, int x2, int y2, int front, int right = 0) override;
109  int x, int y, int x2, int y2, int front, vtkUnsignedCharArray* data, int right = 0) override;
110  int SetRGBACharPixelData(int x, int y, int x2, int y2, unsigned char* data, int front,
111  int blend = 0, int right = 0) override;
112  int SetRGBACharPixelData(int x, int y, int x2, int y2, vtkUnsignedCharArray* data, int front,
113  int blend = 0, int right = 0) override;
115 
117 
120  float* GetZbufferData(int x1, int y1, int x2, int y2) override;
121  int GetZbufferData(int x1, int y1, int x2, int y2, float* z) override;
122  int GetZbufferData(int x1, int y1, int x2, int y2, vtkFloatArray* z) override;
123  int SetZbufferData(int x1, int y1, int x2, int y2, float* buffer) override;
124  int SetZbufferData(int x1, int y1, int x2, int y2, vtkFloatArray* buffer) override;
126 
131 
136 
141 
145  int GetDepthBufferSize() override;
146 
151 
156  int GetColorBufferSizes(int* rgba) override;
157 
163  int GetColorBufferInternalFormat(int attachmentPoint);
164 
166 
174  void SetSize(int width, int height) override;
175  void SetSize(int a[2]) override { this->SetSize(a[0], a[1]); }
177 
181  virtual void OpenGLInit();
182 
183  // Initialize the state of OpenGL that VTK wants for this window
184  virtual void OpenGLInitState();
185 
186  // Initialize VTK for rendering in a new OpenGL context
187  virtual void OpenGLInitContext();
188 
194  void GetOpenGLVersion(int& major, int& minor);
195 
203  unsigned int GetBackLeftBuffer();
204 
212  unsigned int GetBackRightBuffer();
213 
221  unsigned int GetFrontLeftBuffer();
222 
230  unsigned int GetFrontRightBuffer();
231 
236  unsigned int GetBackBuffer();
237 
242  unsigned int GetFrontBuffer();
243 
248 
253 
258 
260 
263  vtkGetObjectMacro(OffScreenFramebuffer, vtkOpenGLFramebufferObject);
265 
271 
276  void WaitForCompletion() override;
277 
281  virtual void DrawPixels(
282  int x1, int y1, int x2, int y2, int numComponents, int dataType, void* data);
283 
288  virtual void DrawPixels(int dstXmin, int dstYmin, int dstXmax, int dstYmax, int srcXmin,
289  int srcYmin, int srcXmax, int srcYmax, int srcWidth, int srcHeight, int numComponents,
290  int dataType, void* data);
291 
296  virtual void DrawPixels(int srcWidth, int srcHeight, int numComponents, int dataType, void* data);
297 
301  virtual float GetMaximumHardwareLineWidth() { return this->MaximumHardwareLineWidth; }
302 
309  virtual bool IsPointSpriteBugPresent() { return 0; }
310 
317  int vtktype, int numComponents, bool needInteger, bool needFloat, bool needSRGB);
318 
324  std::string GetOpenGLSupportMessage() { return this->OpenGLSupportMessage; }
325 
329  int SupportsOpenGL() override;
330 
334  const char* ReportCapabilities() override;
335 
342  virtual void Initialize(void) {}
343 
344  std::set<vtkGenericOpenGLResourceFreeCallback*> Resources;
345 
347  {
348  std::set<vtkGenericOpenGLResourceFreeCallback*>::iterator it = this->Resources.find(cb);
349  if (it == this->Resources.end())
350  {
351  this->Resources.insert(cb);
352  }
353  }
354 
356  {
357  std::set<vtkGenericOpenGLResourceFreeCallback*>::iterator it = this->Resources.find(cb);
358  if (it != this->Resources.end())
359  {
360  this->Resources.erase(it);
361  }
362  }
363 
373  virtual void PushContext() { this->MakeCurrent(); }
374  virtual void PopContext() {}
375 
381 
389  vtkGetMacro(DefaultFrameBufferId, unsigned int);
390 
400  virtual bool SetSwapControl(int) { return false; }
401 
402  // Get the state object used to keep track of
403  // OpenGL state
404  virtual vtkOpenGLState* GetState() { return this->State; }
405 
406  // Get a VBO that can be shared by many
407  // It consists of normalized display
408  // coordinates for a quad and tcoords
410 
411  // Activate and return thje texture unit for a generic 2d 64x64
412  // float greyscale noise texture ranging from 0 to 1. The texture is
413  // generated using PerlinNoise. This textur eunit will automatically
414  // be deactivated at the end of the render process.
416 
420  void End() override;
421 
425  void Render() override;
426 
431  void StereoMidpoint() override;
432 
433  // does VTKs framebuffer require resolving for reading pixels
435 
441 
442 protected:
445 
446  // used in testing for opengl support
447  // in the SupportsOpenGL() method
451 
452  virtual int ReadPixels(
453  const vtkRecti& rect, int front, int glFormat, int glType, void* data, int right = 0);
454 
463  int CreateOffScreenFramebuffer(int width, int height);
465 
469  virtual void CreateAWindow() = 0;
470 
474  virtual void DestroyWindow() = 0;
475 
479  void SaveGLState();
480 
485 
486  std::map<std::string, int> GLStateIntegers;
487 
488  unsigned int BackLeftBuffer;
489  unsigned int BackRightBuffer;
490  unsigned int FrontLeftBuffer;
491  unsigned int FrontRightBuffer;
492  unsigned int DefaultFrameBufferId;
493 
498 
500 
502 
503  bool Initialized; // ensure glewinit has been called
504  bool GlewInitValid; // Did glewInit initialize with a valid state?
505 
507 
509 
510  // used for fast quad rendering
512 
513  // noise texture
515 
517 
518  // keep track of in case we need to recreate the framebuffer
520 
521  int ScreenSize[2];
522 
523 private:
525  void operator=(const vtkOpenGLRenderWindow&) = delete;
526 
527  // Keeping `State` private so the only way to access it is through
528  // `this->GetState()`.
529  vtkOpenGLState* State;
530 };
531 
532 #endif
vtkOpenGLRenderWindow::StereoMidpoint
void StereoMidpoint() override
Intermediate method performs operations required between the rendering of the left and right eye.
vtkOpenGLRenderWindow::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOpenGLRenderWindow::GetContextCreationTime
virtual vtkMTimeType GetContextCreationTime()
Get the time when the OpenGL context was created.
vtkOpenGLRenderWindow::OpenGLInit
virtual void OpenGLInit()
Initialize OpenGL for this window.
vtkOpenGLRenderWindow::GetOpenGLVersion
void GetOpenGLVersion(int &major, int &minor)
Get the major and minor version numbers of the OpenGL context we are using ala 3.2,...
vtkOpenGLRenderWindow::SetSize
void SetSize(int a[2]) override
Definition: vtkOpenGLRenderWindow.h:175
vtkOpenGLRenderWindow::GetMaximumHardwareLineWidth
virtual float GetMaximumHardwareLineWidth()
Return the largest line width supported by the hardware.
Definition: vtkOpenGLRenderWindow.h:301
vtkOpenGLRenderWindow::RegisterGraphicsResources
void RegisterGraphicsResources(vtkGenericOpenGLResourceFreeCallback *cb)
Definition: vtkOpenGLRenderWindow.h:346
vtkOpenGLRenderWindow::ActivateTexture
void ActivateTexture(vtkTextureObject *)
Activate a texture unit for this texture.
vtkOpenGLRenderWindow::DrawPixels
virtual void DrawPixels(int x1, int y1, int x2, int y2, int numComponents, int dataType, void *data)
Replacement for the old glDrawPixels function.
vtkOpenGLRenderWindow::SupportsOpenGL
int SupportsOpenGL() override
Does this render window support OpenGL? 0-false, 1-true.
vtkOpenGLRenderWindow::SetRGBAPixelData
int SetRGBAPixelData(int x, int y, int x2, int y2, vtkFloatArray *data, int front, int blend=0, int right=0) override
vtkOpenGLRenderWindow::GetTQuad2DVBO
vtkOpenGLBufferObject * GetTQuad2DVBO()
vtkOpenGLBufferObject
OpenGL buffer object.
Definition: vtkOpenGLBufferObject.h:34
vtkOpenGLRenderWindow::GetColorBufferSizes
int GetColorBufferSizes(int *rgba) override
Get the size of the color buffer.
vtkOpenGLRenderWindow::DefaultFrameBufferId
unsigned int DefaultFrameBufferId
Definition: vtkOpenGLRenderWindow.h:492
vtkOpenGLRenderWindow::MaximumHardwareLineWidth
float MaximumHardwareLineWidth
Definition: vtkOpenGLRenderWindow.h:506
vtkOpenGLRenderWindow::DrawPixels
virtual void DrawPixels(int srcWidth, int srcHeight, int numComponents, int dataType, void *data)
Replacement for the old glDrawPixels function.
vtkFloatArray
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:36
vtkOpenGLRenderWindow::SetSwapControl
virtual bool SetSwapControl(int)
Set the number of vertical syncs required between frames.
Definition: vtkOpenGLRenderWindow.h:400
vtkX3D::data
@ data
Definition: vtkX3D.h:321
vtkOpenGLRenderWindow::GetOpenGLSupportMessage
std::string GetOpenGLSupportMessage()
Return a message profiding additional details about the results of calling SupportsOpenGL() This can ...
Definition: vtkOpenGLRenderWindow.h:324
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:33
vtkOpenGLRenderWindow::LastMultiSamples
int LastMultiSamples
Definition: vtkOpenGLRenderWindow.h:519
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:36
vtkOpenGLFramebufferObject
Internal class which encapsulates OpenGL FramebufferObject.
Definition: vtkOpenGLFramebufferObject.h:182
vtkOpenGLRenderWindow::ReadPixels
virtual int ReadPixels(const vtkRecti &rect, int front, int glFormat, int glType, void *data, int right=0)
vtkRenderWindow.h
vtkOpenGLRenderWindow::SetPixelData
int SetPixelData(int x, int y, int x2, int y2, unsigned char *data, int front, int right) override
Set/Get the pixel data of an image, transmitted as RGBRGBRGB.
vtkOpenGLRenderWindow::GetPixelData
int GetPixelData(int x, int y, int x2, int y2, int front, vtkUnsignedCharArray *data, int right) override
vtkOpenGLRenderWindow::GetVBOCache
vtkOpenGLVertexBufferObjectCache * GetVBOCache()
Returns the VBO Cache.
vtkOpenGLRenderWindow::UnregisterGraphicsResources
void UnregisterGraphicsResources(vtkGenericOpenGLResourceFreeCallback *cb)
Definition: vtkOpenGLRenderWindow.h:355
vtkOpenGLRenderWindow::DrawPixelsTextureObject
vtkTextureObject * DrawPixelsTextureObject
Definition: vtkOpenGLRenderWindow.h:501
vtkOpenGLRenderWindow::GetBackLeftBuffer
unsigned int GetBackLeftBuffer()
Return the OpenGL name of the back left buffer.
vtkOpenGLRenderWindow::GetBufferNeedsResolving
bool GetBufferNeedsResolving()
vtkOpenGLRenderWindow::GetDepthBufferSize
int GetDepthBufferSize() override
Get the size of the depth buffer.
vtkOpenGLRenderWindow::FrontRightBuffer
unsigned int FrontRightBuffer
Definition: vtkOpenGLRenderWindow.h:491
vtkOpenGLRenderWindow::OpenGLSupportMessage
std::string OpenGLSupportMessage
Definition: vtkOpenGLRenderWindow.h:450
vtkOpenGLRenderWindow::GetBackRightBuffer
unsigned int GetBackRightBuffer()
Return the OpenGL name of the back right buffer.
vtkOpenGLRenderWindow::DrawPixels
virtual void DrawPixels(int dstXmin, int dstYmin, int dstXmax, int dstYmax, int srcXmin, int srcYmin, int srcXmax, int srcYmax, int srcWidth, int srcHeight, int numComponents, int dataType, void *data)
Replacement for the old glDrawPixels function, but it allows for scaling the data and using only part...
vtkOpenGLRenderWindow::GetRenderingBackend
const char * GetRenderingBackend() override
What rendering backend has the user requested.
vtkOpenGLRenderWindow::PopContext
virtual void PopContext()
Definition: vtkOpenGLRenderWindow.h:374
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkOpenGLRenderWindow::GetRGBAPixelData
float * GetRGBAPixelData(int x, int y, int x2, int y2, int front, int right=0) override
Set/Get the pixel data of an image, transmitted as RGBARGBA...
vtkOpenGLRenderWindow::GlewInitValid
bool GlewInitValid
Definition: vtkOpenGLRenderWindow.h:504
vtkType.h
vtkOpenGLRenderWindow::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
Free up any graphics resources associated with this window a value of NULL means the context may alre...
vtkOpenGLRenderWindow::SaveGLState
void SaveGLState()
Query and save OpenGL state.
vtkOpenGLRenderWindow::ContextCreationTime
vtkTimeStamp ContextCreationTime
Definition: vtkOpenGLRenderWindow.h:499
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:66
vtkOpenGLRenderWindow::OpenGLSupportResult
int OpenGLSupportResult
Definition: vtkOpenGLRenderWindow.h:449
vtkTextureUnitManager
allocate/free texture units.
Definition: vtkTextureUnitManager.h:39
vtkOpenGLRenderWindow::DeactivateTexture
void DeactivateTexture(vtkTextureObject *)
Deactivate a previously activated texture.
vtkOpenGLRenderWindow::End
void End() override
Update the system, if needed, at end of render process.
vtkOpenGLRenderWindow::Render
void Render() override
Handle opengl specific code and calls superclass.
vtkX3D::height
@ height
Definition: vtkX3D.h:260
vtkOpenGLRenderWindow::GetTextureUnitForTexture
int GetTextureUnitForTexture(vtkTextureObject *)
Get the texture unit for a given texture object.
vtkOpenGLRenderWindow::InitializeFromCurrentContext
bool InitializeFromCurrentContext() override
Initialize the render window from the information associated with the currently activated OpenGL cont...
vtkOpenGLRenderWindow::OpenGLInitState
virtual void OpenGLInitState()
vtkShaderProgram
The ShaderProgram uses one or more Shader objects.
Definition: vtkShaderProgram.h:45
vtkOpenGLRenderWindow::OwnContext
int OwnContext
Flag telling if the context has been created here or was inherited.
Definition: vtkOpenGLRenderWindow.h:497
vtkOpenGLRenderWindow::GetZbufferData
int GetZbufferData(int x1, int y1, int x2, int y2, float *z) override
vtkGenericOpenGLResourceFreeCallback
Definition: vtkOpenGLResourceFreeCallback.h:26
vtkRenderWindow::MakeCurrent
void MakeCurrent() override
Attempt to make this window the current graphics context for the calling thread.
Definition: vtkRenderWindow.h:642
vtkRect.h
vtkOpenGLRenderWindow::OpenGLInitContext
virtual void OpenGLInitContext()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkTextureObject
abstracts an OpenGL texture object.
Definition: vtkTextureObject.h:41
vtkOpenGLRenderWindow::GetZbufferData
float * GetZbufferData(int x1, int y1, int x2, int y2) override
Set/Get the zbuffer data from an image.
vtkOpenGLRenderWindow::GetFrontBuffer
unsigned int GetFrontBuffer()
Return the OpenGL name of the front left buffer.
vtkOpenGLRenderWindow::SetRGBACharPixelData
int SetRGBACharPixelData(int x, int y, int x2, int y2, unsigned char *data, int front, int blend=0, int right=0) override
vtkOpenGLRenderWindow::Capabilities
char * Capabilities
Definition: vtkOpenGLRenderWindow.h:508
vtkOpenGLRenderWindow::CreateOffScreenFramebuffer
int CreateOffScreenFramebuffer(int width, int height)
Create the offScreen framebuffer Return if the creation was successful or not.
vtkOpenGLRenderWindow::FrontLeftBuffer
unsigned int FrontLeftBuffer
Definition: vtkOpenGLRenderWindow.h:490
vtkOpenGLRenderWindow::NoiseTextureObject
vtkTextureObject * NoiseTextureObject
Definition: vtkOpenGLRenderWindow.h:514
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:31
vtkOpenGLRenderWindow::GetState
virtual vtkOpenGLState * GetState()
Definition: vtkOpenGLRenderWindow.h:404
vtkOpenGLRenderWindow::ReleaseRGBAPixelData
void ReleaseRGBAPixelData(float *data) override
vtkOpenGLRenderWindow::GetUsingSRGBColorSpace
bool GetUsingSRGBColorSpace()
Is this window/fo in sRGB colorspace.
vtkOpenGLShaderCache
manage Shader Programs within a context
Definition: vtkOpenGLShaderCache.h:36
vtkOpenGLRenderWindow::GetBackBuffer
unsigned int GetBackBuffer()
Return the OpenGL name of the back left buffer.
vtkOpenGLRenderWindow::GetTextureUnitManager
vtkTextureUnitManager * GetTextureUnitManager()
Returns its texture unit manager object.
vtkOpenGLRenderWindow::IsPointSpriteBugPresent
virtual bool IsPointSpriteBugPresent()
Returns true if driver has an EGL/OpenGL bug that makes vtkChartsCoreCxx-TestChartDoubleColors and ot...
Definition: vtkOpenGLRenderWindow.h:309
vtkOpenGLRenderWindow::GetPixelData
unsigned char * GetPixelData(int x, int y, int x2, int y2, int front, int right) override
Set/Get the pixel data of an image, transmitted as RGBRGB...
vtkOpenGLRenderWindow::FirstRenderTime
double FirstRenderTime
Definition: vtkOpenGLRenderWindow.h:516
vtkOpenGLRenderWindow::RestoreGLState
void RestoreGLState()
Restore OpenGL state at end of the rendering.
vtkOpenGLRenderWindow::Initialized
bool Initialized
Definition: vtkOpenGLRenderWindow.h:503
vtkOpenGLRenderWindow::GetFrontLeftBuffer
unsigned int GetFrontLeftBuffer()
Return the OpenGL name of the front left buffer.
vtkX3D::string
@ string
Definition: vtkX3D.h:496
vtkOpenGLRenderWindow::ReportCapabilities
const char * ReportCapabilities() override
Get report of capabilities for the render window.
vtkOpenGLRenderWindow::SetSize
void SetSize(int width, int height) override
Set the size (width and height) of the rendering window in screen coordinates (in pixels).
vtkOpenGLRenderWindow::GetRGBAPixelData
int GetRGBAPixelData(int x, int y, int x2, int y2, int front, vtkFloatArray *data, int right=0) override
vtkOpenGLRenderWindow::OpenGLSupportTested
bool OpenGLSupportTested
Definition: vtkOpenGLRenderWindow.h:448
vtkOpenGLRenderWindow::GetFrontRightBuffer
unsigned int GetFrontRightBuffer()
Return the OpenGL name of the front right buffer.
vtkOpenGLRenderWindow::SetPixelData
int SetPixelData(int x, int y, int x2, int y2, vtkUnsignedCharArray *data, int front, int right) override
vtkOpenGLRenderWindow::Frame
void Frame() override
A termination method performed at the end of the rendering process to do things like swapping buffers...
vtkOpenGLRenderWindow::GetColorBufferInternalFormat
int GetColorBufferInternalFormat(int attachmentPoint)
Get the internal format of current attached texture or render buffer.
vtkOpenGLRenderWindow::GetRGBACharPixelData
unsigned char * GetRGBACharPixelData(int x, int y, int x2, int y2, int front, int right=0) override
vtkOpenGLRenderWindow::SetRGBACharPixelData
int SetRGBACharPixelData(int x, int y, int x2, int y2, vtkUnsignedCharArray *data, int front, int blend=0, int right=0) override
vtkOpenGLRenderWindow::BackRightBuffer
unsigned int BackRightBuffer
Definition: vtkOpenGLRenderWindow.h:489
vtkOpenGLRenderWindow::vtkOpenGLRenderWindow
vtkOpenGLRenderWindow()
vtkOpenGLRenderWindow::GetNoiseTextureUnit
int GetNoiseTextureUnit()
vtkOpenGLRenderWindow::DestroyWindow
virtual void DestroyWindow()=0
Destroy a not-off-screen window.
vtkOpenGLVertexBufferObjectCache
manage vertex buffer objects shared within a context
Definition: vtkOpenGLVertexBufferObjectCache.h:39
vtkOpenGLRenderWindow::GetZbufferData
int GetZbufferData(int x1, int y1, int x2, int y2, vtkFloatArray *z) override
vtkOpenGLRenderWindow::GetGlobalMaximumNumberOfMultiSamples
static int GetGlobalMaximumNumberOfMultiSamples()
vtkOpenGLRenderWindow::SetZbufferData
int SetZbufferData(int x1, int y1, int x2, int y2, float *buffer) override
vtkOpenGLRenderWindow::GLStateIntegers
std::map< std::string, int > GLStateIntegers
Definition: vtkOpenGLRenderWindow.h:486
vtkOpenGLRenderWindow::SetZbufferData
int SetZbufferData(int x1, int y1, int x2, int y2, vtkFloatArray *buffer) override
vtkOpenGLRenderWindow::BackLeftBuffer
unsigned int BackLeftBuffer
Definition: vtkOpenGLRenderWindow.h:488
vtkOpenGLRenderWindow::GetRGBACharPixelData
int GetRGBACharPixelData(int x, int y, int x2, int y2, int front, vtkUnsignedCharArray *data, int right=0) override
vtkRecti
Definition: vtkRect.h:313
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:52
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:85
vtkOpenGLRenderWindow::OffScreenFramebuffer
vtkOpenGLFramebufferObject * OffScreenFramebuffer
Definition: vtkOpenGLRenderWindow.h:464
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:35
vtkOpenGLRenderWindow::Start
void Start(void) override
Begin the rendering process.
vtkOpenGLRenderWindow::TQuad2DVBO
vtkOpenGLBufferObject * TQuad2DVBO
Definition: vtkOpenGLRenderWindow.h:511
vtkOpenGLState
OpenGL state storage.
Definition: vtkOpenGLState.h:80
vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples
static void SetGlobalMaximumNumberOfMultiSamples(int val)
Set/Get the maximum number of multisamples.
vtkOpenGLRenderWindow::PushContext
virtual void PushContext()
Ability to push and pop this window's context as the current context.
Definition: vtkOpenGLRenderWindow.h:373
vtkOpenGLRenderWindow::Resources
std::set< vtkGenericOpenGLResourceFreeCallback * > Resources
Definition: vtkOpenGLRenderWindow.h:344
vtkOpenGLRenderWindow::~vtkOpenGLRenderWindow
~vtkOpenGLRenderWindow() override
vtkOpenGLRenderWindow::WaitForCompletion
void WaitForCompletion() override
Block the thread until the actual rendering is finished().
vtkOpenGLVertexArrayObject
The VertexArrayObject class uses, or emulates, vertex array objects.
Definition: vtkOpenGLVertexArrayObject.h:37
vtkOpenGLRenderWindow::GetShaderCache
vtkOpenGLShaderCache * GetShaderCache()
Returns an Shader Cache object.
vtkOpenGLRenderWindow::Initialize
virtual void Initialize(void)
Initialize the rendering window.
Definition: vtkOpenGLRenderWindow.h:342
vtkOpenGLRenderWindow::CreateAWindow
virtual void CreateAWindow()=0
Create a not-off-screen window.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkOpenGLRenderWindow::SetRGBAPixelData
int SetRGBAPixelData(int x, int y, int x2, int y2, float *data, int front, int blend=0, int right=0) override
vtkOpenGLRenderWindow::GetDefaultTextureInternalFormat
int GetDefaultTextureInternalFormat(int vtktype, int numComponents, bool needInteger, bool needFloat, bool needSRGB)
Get a mapping of vtk data types to native texture formats for this window we put this on the RenderWi...