VTK  9.0.20210920
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 =========================================================================*/
54 #ifndef vtkOpenGLRenderWindow_h
55 #define vtkOpenGLRenderWindow_h
56 
57 #include "vtkDeprecation.h" // for VTK_DEPRECATED_IN_9_0_0
58 #include "vtkRect.h" // for vtkRecti
59 #include "vtkRenderWindow.h"
60 #include "vtkRenderingOpenGL2Module.h" // For export macro
61 #include "vtkType.h" // for ivar
62 #include <map> // for ivar
63 #include <set> // for ivar
64 #include <string> // for ivar
65 
66 class vtkIdList;
69 class vtkOpenGLHardwareSupport;
74 class vtkShaderProgram;
75 class vtkStdString;
76 class vtkTexture;
77 class vtkTextureObject;
80 class vtkOpenGLState;
81 
82 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLRenderWindow : public vtkRenderWindow
83 {
84 public:
86  void PrintSelf(ostream& os, vtkIndent indent) override;
87 
91  void Start(void) override;
92 
97  void Frame() override;
98 
102  const char* GetRenderingBackend() override;
103 
105 
111 
113 
118  unsigned char* GetPixelData(int x, int y, int x2, int y2, int front, int right) override;
120  int x, int y, int x2, int y2, int front, vtkUnsignedCharArray* data, int right) override;
122  int x, int y, int x2, int y2, unsigned char* data, int front, int right) override;
124  int x, int y, int x2, int y2, vtkUnsignedCharArray* data, int front, int right) override;
126 
128 
131  float* GetRGBAPixelData(int x, int y, int x2, int y2, int front, int right = 0) override;
133  int x, int y, int x2, int y2, int front, vtkFloatArray* data, int right = 0) override;
135  int x, int y, int x2, int y2, float* data, int front, int blend = 0, int right = 0) override;
136  int SetRGBAPixelData(int x, int y, int x2, int y2, vtkFloatArray* data, int front, int blend = 0,
137  int right = 0) override;
138  void ReleaseRGBAPixelData(float* data) override;
139  unsigned char* GetRGBACharPixelData(
140  int x, int y, int x2, int y2, int front, int right = 0) override;
142  int x, int y, int x2, int y2, int front, vtkUnsignedCharArray* data, int right = 0) override;
143  int SetRGBACharPixelData(int x, int y, int x2, int y2, unsigned char* data, int front,
144  int blend = 0, int right = 0) override;
145  int SetRGBACharPixelData(int x, int y, int x2, int y2, vtkUnsignedCharArray* data, int front,
146  int blend = 0, int right = 0) override;
148 
150 
153  float* GetZbufferData(int x1, int y1, int x2, int y2) override;
154  int GetZbufferData(int x1, int y1, int x2, int y2, float* z) override;
155  int GetZbufferData(int x1, int y1, int x2, int y2, vtkFloatArray* buffer) override;
156  int SetZbufferData(int x1, int y1, int x2, int y2, float* buffer) override;
157  int SetZbufferData(int x1, int y1, int x2, int y2, vtkFloatArray* buffer) override;
159 
164 
169 
174 
178  int GetDepthBufferSize() override;
179 
184 
189  int GetColorBufferSizes(int* rgba) override;
190 
196  int GetColorBufferInternalFormat(int attachmentPoint);
197 
201  virtual void OpenGLInit();
202 
203  // Initialize the state of OpenGL that VTK wants for this window
204  virtual void OpenGLInitState();
205 
206  // Initialize VTK for rendering in a new OpenGL context
207  virtual void OpenGLInitContext();
208 
214  void GetOpenGLVersion(int& major, int& minor);
215 
217  VTK_DEPRECATED_IN_9_1_0("Removed in 9.1, now always returns 0")
218  unsigned int GetBackLeftBuffer();
219  VTK_DEPRECATED_IN_9_1_0("Removed in 9.1, now always returns 0")
220  unsigned int GetBackRightBuffer();
221  VTK_DEPRECATED_IN_9_1_0("Removed in 9.1, now always returns 0")
222  unsigned int GetFrontLeftBuffer();
223  VTK_DEPRECATED_IN_9_1_0("Removed in 9.1, now always returns 0")
224  unsigned int GetFrontRightBuffer();
225  VTK_DEPRECATED_IN_9_1_0("Removed in 9.1, now always returns 0")
226  unsigned int GetBackBuffer();
227  VTK_DEPRECATED_IN_9_1_0("Removed in 9.1, now always returns 0")
228  unsigned int GetFrontBuffer();
230 
234  virtual vtkMTimeType GetContextCreationTime();
235 
239  vtkOpenGLShaderCache* GetShaderCache();
240 
245 
247 
250  vtkGetObjectMacro(RenderFramebuffer, vtkOpenGLFramebufferObject);
251  VTK_DEPRECATED_IN_9_1_0("Removed in 9.1")
252  vtkOpenGLFramebufferObject* GetOffScreenFramebuffer() { return this->RenderFramebuffer; }
254 
258  vtkGetObjectMacro(DisplayFramebuffer, vtkOpenGLFramebufferObject);
259 
265 
270  void WaitForCompletion() override;
271 
275  virtual void DrawPixels(
276  int x1, int y1, int x2, int y2, int numComponents, int dataType, void* data);
277 
282  virtual void DrawPixels(int dstXmin, int dstYmin, int dstXmax, int dstYmax, int srcXmin,
283  int srcYmin, int srcXmax, int srcYmax, int srcWidth, int srcHeight, int numComponents,
284  int dataType, void* data);
285 
290  virtual void DrawPixels(int srcWidth, int srcHeight, int numComponents, int dataType, void* data);
291 
295  virtual float GetMaximumHardwareLineWidth() { return this->MaximumHardwareLineWidth; }
296 
303  virtual bool IsPointSpriteBugPresent() { return false; }
304 
311  int vtktype, int numComponents, bool needInteger, bool needFloat, bool needSRGB);
312 
318  std::string GetOpenGLSupportMessage() { return this->OpenGLSupportMessage; }
319 
323  int SupportsOpenGL() override;
324 
328  const char* ReportCapabilities() override;
329 
336  virtual void Initialize(void) {}
337 
338  std::set<vtkGenericOpenGLResourceFreeCallback*> Resources;
339 
341  {
342  std::set<vtkGenericOpenGLResourceFreeCallback*>::iterator it = this->Resources.find(cb);
343  if (it == this->Resources.end())
344  {
345  this->Resources.insert(cb);
346  }
347  }
348 
350  {
351  std::set<vtkGenericOpenGLResourceFreeCallback*>::iterator it = this->Resources.find(cb);
352  if (it != this->Resources.end())
353  {
354  this->Resources.erase(it);
355  }
356  }
357 
367  virtual void PushContext() { this->MakeCurrent(); }
368  virtual void PopContext() {}
369 
375 
385  virtual bool SetSwapControl(int) { return false; }
386 
387  // Get the state object used to keep track of
388  // OpenGL state
389  virtual vtkOpenGLState* GetState() { return this->State; }
390 
391  // Get a VBO that can be shared by many
392  // It consists of normalized display
393  // coordinates for a quad and tcoords
395 
396  // Activate and return thje texture unit for a generic 2d 64x64
397  // float greyscale noise texture ranging from 0 to 1. The texture is
398  // generated using PerlinNoise. This textur eunit will automatically
399  // be deactivated at the end of the render process.
401 
405  void End() override;
406 
410  void Render() override;
411 
416  void StereoMidpoint() override;
417 
418  // does VTKs framebuffer require resolving for reading pixels
420 
426 
431 
435  void BlitDisplayFramebuffer(int right, int srcX, int srcY, int srcWidth, int srcHeight, int destX,
436  int destY, int destWidth, int destHeight, int bufferMode, int interpolation);
437 
439 
443  void BlitToRenderFramebuffer(bool includeDepth);
444  void BlitToRenderFramebuffer(int srcX, int srcY, int srcWidth, int srcHeight, int destX,
445  int destY, int destWidth, int destHeight, int bufferMode, int interpolation);
447 
453  {
454  BlitToHardware, // hardware buffers
455  BlitToCurrent, // currently bound draw framebuffer
456  NoBlit // no blit, GUI or external code will handle the blit
457  };
458 
460 
464  vtkSetClampMacro(FrameBlitMode, FrameBlitModes, BlitToHardware, NoBlit);
465  vtkGetMacro(FrameBlitMode, FrameBlitModes);
466  void SetFrameBlitModeToBlitToHardware() { this->SetFrameBlitMode(BlitToHardware); }
467  void SetFrameBlitModeToBlitToCurrent() { this->SetFrameBlitMode(BlitToCurrent); }
468  void SetFrameBlitModeToNoBlit() { this->SetFrameBlitMode(NoBlit); }
470 
472  // copy depth values from a source framebuffer to a destination framebuffer
473  // using texture maps to do the copy. The source framebufferobject must be texture
474  // backed. This method is designed to work around issues with trying to blit depth
475  // values between framebuffers that have different depth formats.
476 
477  // blit entire source texture to active viewport
479 
480  // blit specified source texels to active viewport
481  virtual void TextureDepthBlit(vtkTextureObject* source, int srcX, int srcY, int srcX2, int srcY2);
482 
483  // blit specified source texels to specified viewport
484  virtual void TextureDepthBlit(vtkTextureObject* source, int srcX, int srcY, int srcX2, int srcY2,
485  int destX, int destY, int destX2, int destY2);
487 
488 protected:
491 
492  // blits the display buffers to the appropriate hardware buffers
494 
495  // when frame is called, at the end blit to the hardware buffers
497 
498  // a FSQ we use to resolve MSAA that handles gamma
500 
501  // a FSQ we use to blit depth values
503 
504  // used in testing for opengl support
505  // in the SupportsOpenGL() method
509 
510  virtual int ReadPixels(
511  const vtkRecti& rect, int front, int glFormat, int glType, void* data, int right = 0);
512 
521  int CreateFramebuffers(int width, int height);
524 
525  // used when we need to resolve a multisampled
526  // framebuffer
528 
532  virtual void CreateAWindow() = 0;
533 
537  virtual void DestroyWindow() = 0;
538 
542  void SaveGLState();
543 
548 
549  std::map<std::string, int> GLStateIntegers;
550 
555 
557 
559 
560  bool Initialized; // ensure glewinit has been called
561  bool GlewInitValid; // Did glewInit initialize with a valid state?
562 
564 
566 
567  // used for fast quad rendering
569 
570  // noise texture
572 
574 
575  // keep track of in case we need to recreate the framebuffer
577 
578  int ScreenSize[2];
579 
580 private:
582  void operator=(const vtkOpenGLRenderWindow&) = delete;
583 
584  // Keeping `State` private so the only way to access it is through
585  // `this->GetState()`.
586  vtkOpenGLState* State;
587 };
588 
589 #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::OpenGLInit
virtual void OpenGLInit()
Initialize OpenGL for this window.
vtkOpenGLRenderWindow::DisplayFramebuffer
vtkOpenGLFramebufferObject * DisplayFramebuffer
Definition: vtkOpenGLRenderWindow.h:523
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::BlitDisplayFramebuffersToHardware
virtual void BlitDisplayFramebuffersToHardware()
vtkOpenGLRenderWindow::GetMaximumHardwareLineWidth
virtual float GetMaximumHardwareLineWidth()
Return the largest line width supported by the hardware.
Definition: vtkOpenGLRenderWindow.h:295
vtkOpenGLRenderWindow::RegisterGraphicsResources
void RegisterGraphicsResources(vtkGenericOpenGLResourceFreeCallback *cb)
Definition: vtkOpenGLRenderWindow.h:340
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
Set/Get the pixel data of an image, transmitted as RGBARGBA...
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::MaximumHardwareLineWidth
float MaximumHardwareLineWidth
Definition: vtkOpenGLRenderWindow.h:563
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:145
vtkOpenGLRenderWindow::SetSwapControl
virtual bool SetSwapControl(int)
Set the number of vertical syncs required between frames.
Definition: vtkOpenGLRenderWindow.h:385
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:318
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:52
vtkOpenGLRenderWindow::CreateFramebuffers
int CreateFramebuffers(int width, int height)
Create the offScreen framebuffer Return if the creation was successful or not.
vtkOpenGLRenderWindow::LastMultiSamples
int LastMultiSamples
Definition: vtkOpenGLRenderWindow.h:576
vtkOpenGLRenderWindow::ResolveQuad
vtkOpenGLQuadHelper * ResolveQuad
Definition: vtkOpenGLRenderWindow.h:499
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:145
vtkOpenGLRenderWindow::BlitToRenderFramebuffer
void BlitToRenderFramebuffer(bool includeDepth)
Blit the currently bound read buffer to the renderbuffer.
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 RGBRGB...
vtkOpenGLRenderWindow::GetPixelData
int GetPixelData(int x, int y, int x2, int y2, int front, vtkUnsignedCharArray *data, int right) override
Set/Get the pixel data of an image, transmitted as RGBRGB...
vtkOpenGLRenderWindow::BlitDisplayFramebuffer
void BlitDisplayFramebuffer()
Blit a display framebuffer into a currently bound draw destination.
VTK_DEPRECATED_IN_9_1_0
#define VTK_DEPRECATED_IN_9_1_0(reason)
Definition: vtkDeprecation.h:117
vtkOpenGLRenderWindow::UnregisterGraphicsResources
void UnregisterGraphicsResources(vtkGenericOpenGLResourceFreeCallback *cb)
Definition: vtkOpenGLRenderWindow.h:349
vtkOpenGLRenderWindow::DrawPixelsTextureObject
vtkTextureObject * DrawPixelsTextureObject
Definition: vtkOpenGLRenderWindow.h:558
vtkOpenGLQuadHelper
Class to make rendering a full screen quad easier.
Definition: vtkOpenGLQuadHelper.h:58
vtkOpenGLRenderWindow::GetBufferNeedsResolving
bool GetBufferNeedsResolving()
vtkOpenGLRenderWindow::RenderFramebuffer
vtkOpenGLFramebufferObject * RenderFramebuffer
Definition: vtkOpenGLRenderWindow.h:522
vtkOpenGLRenderWindow::GetDepthBufferSize
int GetDepthBufferSize() override
Get the size of the depth buffer.
vtkOpenGLRenderWindow::OpenGLSupportMessage
std::string OpenGLSupportMessage
Definition: vtkOpenGLRenderWindow.h:508
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:368
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
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:561
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:556
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:175
vtkOpenGLRenderWindow::OpenGLSupportResult
int OpenGLSupportResult
Definition: vtkOpenGLRenderWindow.h:507
vtkTextureUnitManager
allocate/free texture units.
Definition: vtkTextureUnitManager.h:39
vtkOpenGLRenderWindow::BlitDisplayFramebuffer
void BlitDisplayFramebuffer(int right, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, int bufferMode, int interpolation)
Blit a display buffer into a currently bound draw destination.
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::FrameBlitModes
FrameBlitModes
Define how the resulting image should be blitted when at the end of the Frame() call if SwapBuffers i...
Definition: vtkOpenGLRenderWindow.h:453
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::DepthBlitQuad
vtkOpenGLQuadHelper * DepthBlitQuad
Definition: vtkOpenGLRenderWindow.h:502
vtkOpenGLRenderWindow::OpenGLInitState
virtual void OpenGLInitState()
vtkShaderProgram
The ShaderProgram uses one or more Shader objects.
Definition: vtkShaderProgram.h:124
vtkOpenGLRenderWindow::ResolveFramebuffer
vtkOpenGLFramebufferObject * ResolveFramebuffer
Definition: vtkOpenGLRenderWindow.h:527
vtkOpenGLRenderWindow::GetZbufferData
int GetZbufferData(int x1, int y1, int x2, int y2, float *z) override
Set/Get the zbuffer data from an image.
vtkGenericOpenGLResourceFreeCallback
Definition: vtkOpenGLResourceFreeCallback.h:26
vtkRect.h
vtkOpenGLRenderWindow::BlitToRenderFramebuffer
void BlitToRenderFramebuffer(int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, int bufferMode, int interpolation)
Blit the currently bound read buffer to the renderbuffer.
vtkOpenGLRenderWindow::OpenGLInitContext
virtual void OpenGLInitContext()
vtkOpenGLRenderWindow::TextureDepthBlit
virtual void TextureDepthBlit(vtkTextureObject *source)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkTextureObject
abstracts an OpenGL texture object.
Definition: vtkTextureObject.h:60
vtkOpenGLRenderWindow::GetZbufferData
float * GetZbufferData(int x1, int y1, int x2, int y2) override
Set/Get the zbuffer data from an image.
vtkOpenGLRenderWindow::SetRGBACharPixelData
int SetRGBACharPixelData(int x, int y, int x2, int y2, unsigned char *data, int front, int blend=0, int right=0) override
Set/Get the pixel data of an image, transmitted as RGBARGBA...
vtkOpenGLRenderWindow::Capabilities
char * Capabilities
Definition: vtkOpenGLRenderWindow.h:565
vtkOpenGLRenderWindow::NoiseTextureObject
vtkTextureObject * NoiseTextureObject
Definition: vtkOpenGLRenderWindow.h:571
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:140
vtkOpenGLRenderWindow::SetFrameBlitModeToBlitToHardware
void SetFrameBlitModeToBlitToHardware()
SetGet how to handle blits at the end of a Frame() call.
Definition: vtkOpenGLRenderWindow.h:466
vtkOpenGLRenderWindow::GetState
virtual vtkOpenGLState * GetState()
Definition: vtkOpenGLRenderWindow.h:389
vtkOpenGLRenderWindow::ReleaseRGBAPixelData
void ReleaseRGBAPixelData(float *data) override
Set/Get the pixel data of an image, transmitted as RGBARGBA...
vtkOpenGLRenderWindow::GetUsingSRGBColorSpace
bool GetUsingSRGBColorSpace()
Is this window/fo in sRGB colorspace.
vtkOpenGLShaderCache
manage Shader Programs within a context
Definition: vtkOpenGLShaderCache.h:36
vtkOpenGLRenderWindow::GetTextureUnitManager
vtkTextureUnitManager * GetTextureUnitManager()
Returns its texture unit manager object.
vtkOpenGLRenderWindow::TextureDepthBlit
virtual void TextureDepthBlit(vtkTextureObject *source, int srcX, int srcY, int srcX2, int srcY2, int destX, int destY, int destX2, int destY2)
vtkOpenGLRenderWindow::IsPointSpriteBugPresent
virtual bool IsPointSpriteBugPresent()
Returns true if driver has an EGL/OpenGL bug that makes vtkChartsCoreCxx-TestChartDoubleColors and ot...
Definition: vtkOpenGLRenderWindow.h:303
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:573
vtkOpenGLRenderWindow::TextureDepthBlit
virtual void TextureDepthBlit(vtkTextureObject *source, int srcX, int srcY, int srcX2, int srcY2)
vtkOpenGLRenderWindow::RestoreGLState
void RestoreGLState()
Restore OpenGL state at end of the rendering.
vtkOpenGLRenderWindow::Initialized
bool Initialized
Definition: vtkOpenGLRenderWindow.h:560
vtkX3D::string
@ string
Definition: vtkX3D.h:496
vtkOpenGLRenderWindow::ReportCapabilities
const char * ReportCapabilities() override
Get report of capabilities for the render window.
vtkOpenGLRenderWindow::GetRGBAPixelData
int GetRGBAPixelData(int x, int y, int x2, int y2, int front, vtkFloatArray *data, int right=0) override
Set/Get the pixel data of an image, transmitted as RGBARGBA...
vtkOpenGLRenderWindow::FrameBlitMode
FrameBlitModes FrameBlitMode
Definition: vtkOpenGLRenderWindow.h:496
vtkOpenGLRenderWindow::OpenGLSupportTested
bool OpenGLSupportTested
Definition: vtkOpenGLRenderWindow.h:506
vtkWindow::MakeCurrent
virtual void MakeCurrent()
Make the window current.
Definition: vtkWindow.h:246
vtkOpenGLRenderWindow::SetPixelData
int SetPixelData(int x, int y, int x2, int y2, vtkUnsignedCharArray *data, int front, int right) override
Set/Get the pixel data of an image, transmitted as RGBRGB...
vtkOpenGLRenderWindow::Frame
void Frame() override
A termination method performed at the end of the rendering process to do things like swapping buffers...
vtkDeprecation.h
vtkOpenGLRenderWindow::OwnContext
vtkTypeBool OwnContext
Flag telling if the context has been created here or was inherited.
Definition: vtkOpenGLRenderWindow.h:554
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
Set/Get the pixel data of an image, transmitted as RGBARGBA...
vtkOpenGLRenderWindow::SetRGBACharPixelData
int SetRGBACharPixelData(int x, int y, int x2, int y2, vtkUnsignedCharArray *data, int front, int blend=0, int right=0) override
Set/Get the pixel data of an image, transmitted as RGBARGBA...
vtkOpenGLRenderWindow::vtkOpenGLRenderWindow
vtkOpenGLRenderWindow()
vtkOpenGLRenderWindow::GetNoiseTextureUnit
int GetNoiseTextureUnit()
vtkOpenGLRenderWindow::BlitToCurrent
@ BlitToCurrent
Definition: vtkOpenGLRenderWindow.h:455
vtkOpenGLRenderWindow::BlitToHardware
@ BlitToHardware
Definition: vtkOpenGLRenderWindow.h:454
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::SetFrameBlitModeToNoBlit
void SetFrameBlitModeToNoBlit()
SetGet how to handle blits at the end of a Frame() call.
Definition: vtkOpenGLRenderWindow.h:468
vtkOpenGLRenderWindow::GetGlobalMaximumNumberOfMultiSamples
static int GetGlobalMaximumNumberOfMultiSamples()
Set/Get the maximum number of multisamples.
vtkOpenGLRenderWindow::SetZbufferData
int SetZbufferData(int x1, int y1, int x2, int y2, float *buffer) override
Set/Get the zbuffer data from an image.
vtkOpenGLRenderWindow::GLStateIntegers
std::map< std::string, int > GLStateIntegers
Definition: vtkOpenGLRenderWindow.h:549
vtkOpenGLRenderWindow::SetZbufferData
int SetZbufferData(int x1, int y1, int x2, int y2, vtkFloatArray *buffer) override
Set/Get the zbuffer data from an image.
vtkOpenGLRenderWindow::GetRGBACharPixelData
int GetRGBACharPixelData(int x, int y, int x2, int y2, int front, vtkUnsignedCharArray *data, int right=0) override
Set/Get the pixel data of an image, transmitted as RGBARGBA...
vtkRecti
Definition: vtkRect.h:322
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:998
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:83
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:205
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:105
vtkOpenGLRenderWindow::Start
void Start(void) override
Begin the rendering process.
vtkOpenGLRenderWindow::TQuad2DVBO
vtkOpenGLBufferObject * TQuad2DVBO
Definition: vtkOpenGLRenderWindow.h:568
vtkOpenGLRenderWindow::GetZbufferData
int GetZbufferData(int x1, int y1, int x2, int y2, vtkFloatArray *buffer) override
Set/Get the zbuffer data from an image.
vtkOpenGLState
OpenGL state storage.
Definition: vtkOpenGLState.h:82
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:367
vtkOpenGLRenderWindow::Resources
std::set< vtkGenericOpenGLResourceFreeCallback * > Resources
Definition: vtkOpenGLRenderWindow.h:338
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
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkOpenGLRenderWindow::SetFrameBlitModeToBlitToCurrent
void SetFrameBlitModeToBlitToCurrent()
SetGet how to handle blits at the end of a Frame() call.
Definition: vtkOpenGLRenderWindow.h:467
vtkOpenGLRenderWindow::Initialize
virtual void Initialize(void)
Initialize the rendering window.
Definition: vtkOpenGLRenderWindow.h:336
vtkOpenGLRenderWindow::CreateAWindow
virtual void CreateAWindow()=0
Create a not-off-screen window.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
vtkOpenGLRenderWindow::SetRGBAPixelData
int SetRGBAPixelData(int x, int y, int x2, int y2, float *data, int front, int blend=0, int right=0) override
Set/Get the pixel data of an image, transmitted as RGBARGBA...
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...