VTK
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 =========================================================================*/
28 #ifndef vtkOpenGLRenderWindow_h
29 #define vtkOpenGLRenderWindow_h
30 
31 #include "vtkRect.h" // for vtkRecti
32 #include "vtkRenderWindow.h"
33 #include "vtkRenderingOpenGL2Module.h" // For export macro
34 #include "vtkType.h" // for ivar
35 #include <map> // for ivar
36 #include <set> // for ivar
37 #include <string> // for ivar
38 
39 class vtkIdList;
41 class vtkOpenGLHardwareSupport;
45 class vtkShaderProgram;
46 class vtkStdString;
47 class vtkTexture;
48 class vtkTextureObject;
51 class vtkOpenGLState;
52 
53 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLRenderWindow : public vtkRenderWindow
54 {
55 public:
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
62  const char *GetRenderingBackend() override;
63 
65 
71 
73 
76  unsigned char *GetPixelData(int x,int y,int x2,int y2,int front,int right)
77  override;
78  int GetPixelData(int x,int y,int x2,int y2, int front,
79  vtkUnsignedCharArray *data, int right) override;
80  int SetPixelData(int x,int y,int x2,int y2,unsigned char *data,
81  int front, int right) override;
82  int SetPixelData(int x,int y,int x2,int y2,
83  vtkUnsignedCharArray *data, int front, int right)
84  override;
86 
88 
91  float *GetRGBAPixelData(int x,int y,int x2,int y2,int front,int right=0)
92  override;
93  int GetRGBAPixelData(int x,int y,int x2,int y2, int front,
94  vtkFloatArray* data, int right=0) override;
95  int SetRGBAPixelData(int x,int y,int x2,int y2, float *data,
96  int front, int blend=0, int right=0) override;
97  int SetRGBAPixelData(int x,int y,int x2,int y2, vtkFloatArray *data,
98  int front, int blend=0, int right=0) override;
99  void ReleaseRGBAPixelData(float *data) override;
100  unsigned char *GetRGBACharPixelData(int x,int y,int x2,int y2,
101  int front, int right=0) override;
102  int GetRGBACharPixelData(int x,int y,int x2,int y2, int front,
103  vtkUnsignedCharArray *data, int right=0)
104  override;
105  int SetRGBACharPixelData(int x, int y, int x2, int y2,
106  unsigned char *data, int front,
107  int blend=0, int right=0) override;
108  int SetRGBACharPixelData(int x,int y,int x2,int y2,
109  vtkUnsignedCharArray *data, int front,
110  int blend=0,int right=0) override;
112 
114 
117  float *GetZbufferData( int x1, int y1, int x2, int y2 ) override;
118  int GetZbufferData( int x1, int y1, int x2, int y2, float* z ) override;
119  int GetZbufferData( int x1, int y1, int x2, int y2,
120  vtkFloatArray* z ) override;
121  int SetZbufferData( int x1, int y1, int x2, int y2, float *buffer ) override;
122  int SetZbufferData( int x1, int y1, int x2, int y2,
123  vtkFloatArray *buffer ) override;
125 
126 
131 
136 
141 
145  int GetDepthBufferSize() override;
146 
151 
156  int GetColorBufferSizes(int *rgba) override;
157 
163  int GetColorBufferInternalFormat(int attachmentPoint);
164 
166 
169  void SetSize(int a[2]) override;
170  void SetSize(int,int) override;
172 
176  virtual void OpenGLInit();
177 
178  // Initialize the state of OpenGL that VTK wants for this window
179  virtual void OpenGLInitState();
180 
181  // Initialize VTK for rendering in a new OpenGL context
182  virtual void OpenGLInitContext();
183 
189  void GetOpenGLVersion(int &major, int &minor);
190 
198  unsigned int GetBackLeftBuffer();
199 
207  unsigned int GetBackRightBuffer();
208 
216  unsigned int GetFrontLeftBuffer();
217 
225  unsigned int GetFrontRightBuffer();
226 
234  unsigned int GetBackBuffer();
235 
243  unsigned int GetFrontBuffer();
244 
249 
251 
254  vtkGetObjectMacro(ShaderCache,vtkOpenGLShaderCache);
256 
258 
261  vtkGetObjectMacro(VBOCache,vtkOpenGLVertexBufferObjectCache);
263 
265 
268  vtkGetMacro(FrameBufferObject, unsigned int);
270 
276 
281  void WaitForCompletion() override;
282 
286  virtual void DrawPixels(int x1, int y1, int x2, int y2,
287  int numComponents, int dataType, void *data);
288 
293  virtual void DrawPixels(
294  int dstXmin, int dstYmin, int dstXmax, int dstYmax,
295  int srcXmin, int srcYmin, int srcXmax, int srcYmax,
296  int srcWidth, int srcHeight, int numComponents, int dataType, void *data);
297 
302  virtual void DrawPixels(
303  int srcWidth, int srcHeight, int numComponents, int dataType, void *data);
304 
308  virtual float GetMaximumHardwareLineWidth() {
309  return this->MaximumHardwareLineWidth; };
310 
317  virtual bool IsPointSpriteBugPresent()
318  {
319  return 0;
320  }
321 
328  int vtktype, int numComponents,
329  bool needInteger, bool needFloat, bool needSRGB);
330 
337  {
338  return this->OpenGLSupportMessage;
339  }
340 
341  // Create and bind offscreen rendering buffers without destroying the current
342  // OpenGL context. This allows to temporary switch to offscreen rendering
343  // (ie. to make a screenshot even if the window is hidden).
344  // Return if the creation was successful (1) or not (0).
345  // Note: This function requires that the device supports OpenGL framebuffer extension.
346  // The function has no effect if OffScreenRendering is ON.
347  int SetUseOffScreenBuffers(bool offScreen) override;
348  bool GetUseOffScreenBuffers() override;
349 
353  int SupportsOpenGL() override;
354 
358  const char *ReportCapabilities() override;
359 
366  virtual void Initialize(void) {};
367 
368  std::set<vtkGenericOpenGLResourceFreeCallback *> Resources;
369 
371  std::set<vtkGenericOpenGLResourceFreeCallback *>::iterator it
372  = this->Resources.find(cb);
373  if (it == this->Resources.end())
374  {
375  this->Resources.insert(cb);
376  }
377  }
378 
380  std::set<vtkGenericOpenGLResourceFreeCallback *>::iterator it
381  = this->Resources.find(cb);
382  if (it != this->Resources.end())
383  {
384  this->Resources.erase(it);
385  }
386  }
387 
397  virtual void PushContext() { this->MakeCurrent(); }
398  virtual void PopContext() {}
399 
405 
413  vtkGetMacro(DefaultFrameBufferId, unsigned int);
414 
424  virtual bool SetSwapControl(int ) { return false; }
425 
426  // Get the state object used to keep track of
427  // OpenGL state
429  return this->State; }
430 
431  // Get a VBO that can be shared by many
432  // It consists of normalized display
433  // coordinates for a quad and tcoords
435 
436  // Activate and return thje texture unit for a generic 2d 64x64
437  // float greyscale noise texture ranging from 0 to 1. The texture is
438  // generated using PerlinNoise. This textur eunit will automatically
439  // be deactivated at the end of the render process.
441 
446  void StereoUpdate() override;
447 
452  void StereoMidpoint() override;
453 
457  void Render() override;
458 
459 protected:
462 
465 
467 
468  // used in testing for opengl support
469  // in the SupportsOpenGL() method
473 
474  int TextureInternalFormats[VTK_UNICODE_STRING][3][5];
476 
477  std::map<const vtkTextureObject *, int> TextureResourceIds;
478 
479  virtual int ReadPixels(const vtkRecti& rect, int front, int glFormat, int glType, void* data, int right=0);
480 
491 
492  int CreateHardwareOffScreenBuffers(int width, int height, bool bind = false);
494 
501 
504 
509 
511 
515  unsigned int TextureObjects[4]; // really GLuint
516  unsigned int FrameBufferObject; // really GLuint
517  unsigned int DepthRenderBufferObject; // really GLuint
518  int HardwareBufferSize[2];
521 
525  virtual void CreateAWindow() = 0;
526 
530  virtual void DestroyWindow() = 0;
531 
537 
541  void SetTextureUnitManager(vtkTextureUnitManager *textureUnitManager);
542 
543 
547  void SaveGLState();
548 
553 
554  std::map<std::string, int> GLStateIntegers;
555 
556  unsigned int BackLeftBuffer;
557  unsigned int BackRightBuffer;
558  unsigned int FrontLeftBuffer;
559  unsigned int FrontRightBuffer;
560  unsigned int FrontBuffer;
561  unsigned int BackBuffer;
562  unsigned int DefaultFrameBufferId;
563 
568 
570 
572 
574 
575  bool Initialized; // ensure glewinit has been called
576  bool GlewInitValid; // Did glewInit initialize with a valid state?
577 
579 
581 
582  // used for fast quad rendering
584 
585  // noise texture
587 
588 private:
590  void operator=(const vtkOpenGLRenderWindow&) = delete;
591 };
592 
593 #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::DestroyHardwareOffScreenBuffers
void DestroyHardwareOffScreenBuffers()
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
Set the size of the window in screen coordinates in pixels.
vtkOpenGLRenderWindow::GetMaximumHardwareLineWidth
virtual float GetMaximumHardwareLineWidth()
Return the largest line width supported by the hardware.
Definition: vtkOpenGLRenderWindow.h:308
vtkOpenGLRenderWindow::RegisterGraphicsResources
void RegisterGraphicsResources(vtkGenericOpenGLResourceFreeCallback *cb)
Definition: vtkOpenGLRenderWindow.h:370
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::NumberOfFrameBuffers
int NumberOfFrameBuffers
Variables used by the framebuffer-based offscreen method.
Definition: vtkOpenGLRenderWindow.h:514
vtkOpenGLRenderWindow::GetColorBufferSizes
int GetColorBufferSizes(int *rgba) override
Get the size of the color buffer.
vtkOpenGLRenderWindow::DefaultFrameBufferId
unsigned int DefaultFrameBufferId
Definition: vtkOpenGLRenderWindow.h:562
vtkOpenGLRenderWindow::DestroyHardwareOffScreenWindow
void DestroyHardwareOffScreenWindow()
Destroy an offscreen window based on OpenGL framebuffer extension.
vtkOpenGLRenderWindow::MaximumHardwareLineWidth
float MaximumHardwareLineWidth
Definition: vtkOpenGLRenderWindow.h:578
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:42
vtkOpenGLRenderWindow::SetSwapControl
virtual bool SetSwapControl(int)
Set the number of vertical syncs required between frames.
Definition: vtkOpenGLRenderWindow.h:424
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkOpenGLRenderWindow::TextureResourceIds
std::map< const vtkTextureObject *, int > TextureResourceIds
Definition: vtkOpenGLRenderWindow.h:477
vtkOpenGLRenderWindow::GetOpenGLSupportMessage
std::string GetOpenGLSupportMessage()
Return a message profiding additional details about the results of calling SupportsOpenGL() This can ...
Definition: vtkOpenGLRenderWindow.h:336
VTK_UNICODE_STRING
#define VTK_UNICODE_STRING
Definition: vtkType.h:85
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkOpenGLRenderWindow::SetSize
void SetSize(int, int) override
vtkOpenGLRenderWindow::SetTextureUnitManager
void SetTextureUnitManager(vtkTextureUnitManager *textureUnitManager)
Set the texture unit manager.
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:42
vtkOpenGLRenderWindow::BindHardwareOffScreenBuffers
void BindHardwareOffScreenBuffers()
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::CreateHardwareOffScreenWindow
int CreateHardwareOffScreenWindow(int width, int height)
Create an offScreen window based on OpenGL framebuffer extension.
vtkOpenGLRenderWindow::Resources
std::set< vtkGenericOpenGLResourceFreeCallback * > Resources
Definition: vtkOpenGLRenderWindow.h:366
vtkOpenGLRenderWindow::UnregisterGraphicsResources
void UnregisterGraphicsResources(vtkGenericOpenGLResourceFreeCallback *cb)
Definition: vtkOpenGLRenderWindow.h:379
vtkOpenGLRenderWindow::DrawPixelsTextureObject
vtkTextureObject * DrawPixelsTextureObject
Definition: vtkOpenGLRenderWindow.h:573
vtkOpenGLRenderWindow::FrameBufferObject
unsigned int FrameBufferObject
Definition: vtkOpenGLRenderWindow.h:516
vtkOpenGLRenderWindow::SetUseOffScreenBuffers
int SetUseOffScreenBuffers(bool offScreen) override
Create and bind offscreen rendering buffers without destroying the current OpenGL context.
vtkOpenGLRenderWindow::GetBackLeftBuffer
unsigned int GetBackLeftBuffer()
Return the OpenGL name of the back left buffer.
vtkOpenGLRenderWindow::TextureUnitManager
vtkTextureUnitManager * TextureUnitManager
Definition: vtkOpenGLRenderWindow.h:571
vtkOpenGLRenderWindow::GetDepthBufferSize
int GetDepthBufferSize() override
Get the size of the depth buffer.
vtkOpenGLRenderWindow::OffScreenUseFrameBuffer
int OffScreenUseFrameBuffer
Flag telling if a framebuffer-based offscreen is currently in use.
Definition: vtkOpenGLRenderWindow.h:508
vtkOpenGLRenderWindow::FrontRightBuffer
unsigned int FrontRightBuffer
Definition: vtkOpenGLRenderWindow.h:559
vtkOpenGLRenderWindow::OpenGLSupportMessage
std::string OpenGLSupportMessage
Definition: vtkOpenGLRenderWindow.h:472
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:398
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::FrontBuffer
unsigned int FrontBuffer
Definition: vtkOpenGLRenderWindow.h:560
vtkOpenGLRenderWindow::GlewInitValid
bool GlewInitValid
Definition: vtkOpenGLRenderWindow.h:576
vtkType.h
vtkOpenGLRenderWindow::SaveGLState
void SaveGLState()
Query and save OpenGL state.
vtkOpenGLRenderWindow::ContextCreationTime
vtkTimeStamp ContextCreationTime
Definition: vtkOpenGLRenderWindow.h:569
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:72
vtkOpenGLRenderWindow::OpenGLSupportResult
int OpenGLSupportResult
Definition: vtkOpenGLRenderWindow.h:471
vtkTextureUnitManager
allocate/free texture units.
Definition: vtkTextureUnitManager.h:39
vtkOpenGLRenderWindow::ShaderCache
vtkOpenGLShaderCache * ShaderCache
Definition: vtkOpenGLRenderWindow.h:463
vtkOpenGLRenderWindow::DeactivateTexture
void DeactivateTexture(vtkTextureObject *)
Deactivate a previously activated texture.
vtkOpenGLRenderWindow::HardwareOffScreenBuffersBind
bool HardwareOffScreenBuffersBind
Definition: vtkOpenGLRenderWindow.h:519
vtkOpenGLRenderWindow::Render
void Render() override
Handle opengl specific code and calls superclass.
vtkX3D::height
@ height
Definition: vtkX3D.h:254
vtkOpenGLRenderWindow::VBOCache
vtkOpenGLVertexBufferObjectCache * VBOCache
Definition: vtkOpenGLRenderWindow.h:464
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:48
vtkOpenGLRenderWindow::OwnContext
int OwnContext
Flag telling if the context has been created here or was inherited.
Definition: vtkOpenGLRenderWindow.h:567
vtkOpenGLRenderWindow::GetZbufferData
int GetZbufferData(int x1, int y1, int x2, int y2, float *z) override
vtkGenericOpenGLResourceFreeCallback
Definition: vtkOpenGLResourceFreeCallback.h:26
vtkRect.h
vtkOpenGLRenderWindow::OpenGLInitContext
virtual void OpenGLInitContext()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkTextureObject
abstracts an OpenGL texture object.
Definition: vtkTextureObject.h:45
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::GetUseOffScreenBuffers
bool GetUseOffScreenBuffers() override
vtkOpenGLRenderWindow::Capabilities
char * Capabilities
Definition: vtkOpenGLRenderWindow.h:580
vtkOpenGLRenderWindow::FrontLeftBuffer
unsigned int FrontLeftBuffer
Definition: vtkOpenGLRenderWindow.h:558
vtkOpenGLRenderWindow::NoiseTextureObject
vtkTextureObject * NoiseTextureObject
Definition: vtkOpenGLRenderWindow.h:586
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:37
vtkOpenGLRenderWindow::GetState
virtual vtkOpenGLState * GetState()
Definition: vtkOpenGLRenderWindow.h:428
vtkOpenGLRenderWindow::ReleaseRGBAPixelData
void ReleaseRGBAPixelData(float *data) override
vtkOpenGLRenderWindow::GetUsingSRGBColorSpace
bool GetUsingSRGBColorSpace()
Is this window/fo in sRGB colorspace.
vtkRenderWindow::MakeCurrent
void MakeCurrent() override=0
Attempt to make this window the current graphics context for the calling thread.
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:317
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::RestoreGLState
void RestoreGLState()
Restore OpenGL state at end of the rendering.
vtkOpenGLRenderWindow::Initialized
bool Initialized
Definition: vtkOpenGLRenderWindow.h:575
vtkOpenGLRenderWindow::GetFrontLeftBuffer
unsigned int GetFrontLeftBuffer()
Return the OpenGL name of the front left buffer.
vtkX3D::string
@ string
Definition: vtkX3D.h:490
vtkOpenGLRenderWindow::ReportCapabilities
const char * ReportCapabilities() override
Get report of capabilities for the render window.
vtkOpenGLRenderWindow::CreateHardwareOffScreenBuffers
int CreateHardwareOffScreenBuffers(int width, int height, bool bind=false)
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:470
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::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:557
vtkOpenGLRenderWindow::vtkOpenGLRenderWindow
vtkOpenGLRenderWindow()
vtkOpenGLRenderWindow::GetNoiseTextureUnit
int GetNoiseTextureUnit()
vtkOpenGLRenderWindow::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkRenderWindow *)
Free up any graphics resources associated with this window a value of NULL means the context may alre...
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::InitializeTextureInternalFormats
void InitializeTextureInternalFormats()
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:554
vtkOpenGLRenderWindow::SetZbufferData
int SetZbufferData(int x1, int y1, int x2, int y2, vtkFloatArray *buffer) override
vtkOpenGLRenderWindow::BackLeftBuffer
unsigned int BackLeftBuffer
Definition: vtkOpenGLRenderWindow.h:556
vtkOpenGLRenderWindow::GetRGBACharPixelData
int GetRGBACharPixelData(int x, int y, int x2, int y2, int front, vtkUnsignedCharArray *data, int right=0) override
vtkRecti
Definition: vtkRect.h:324
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:54
vtkOpenGLRenderWindow::State
vtkOpenGLState * State
Definition: vtkOpenGLRenderWindow.h:466
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:88
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:41
vtkOpenGLRenderWindow::StereoUpdate
void StereoUpdate() override
Update the system, if needed, due to stereo rendering.
vtkOpenGLRenderWindow::TQuad2DVBO
vtkOpenGLBufferObject * TQuad2DVBO
Definition: vtkOpenGLRenderWindow.h:583
vtkOpenGLRenderWindow::DepthRenderBufferObject
unsigned int DepthRenderBufferObject
Definition: vtkOpenGLRenderWindow.h:517
vtkOpenGLRenderWindow::BackBuffer
unsigned int BackBuffer
Definition: vtkOpenGLRenderWindow.h:561
vtkOpenGLState
OpenGL state storage.
Definition: vtkOpenGLState.h:68
vtkOpenGLRenderWindow::UnbindHardwareOffScreenBuffers
void UnbindHardwareOffScreenBuffers()
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:397
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::Initialize
virtual void Initialize(void)
Initialize the rendering window.
Definition: vtkOpenGLRenderWindow.h:366
vtkOpenGLRenderWindow::CreateAWindow
virtual void CreateAWindow()=0
Create a not-off-screen window.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
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...