VTK  9.2.6
vtkOpenGLQuadHelper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4 
5  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6  All rights reserved.
7  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
48 #ifndef vtkOpenGLQuadHelper_h
49 #define vtkOpenGLQuadHelper_h
50 
51 #include "vtkRenderingOpenGL2Module.h" // for export macro
52 #include "vtkTimeStamp.h"
53 #include <memory> // for std::unique_ptr
54 
57 class vtkShaderProgram;
59 class vtkWindow;
60 
61 // Helper class to render full screen quads
62 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLQuadHelper
63 {
64 public:
68  unsigned int ShaderChangeValue;
69 
78  vtkOpenGLRenderWindow*, const char* vs, const char* fs, const char* gs, bool flipY = false);
79 
81 
82  // Draw the Quad, will bind the VAO for you
83  void Render();
84 
91 
92 private:
94  vtkOpenGLQuadHelper& operator=(const vtkOpenGLQuadHelper&) = delete;
95  std::unique_ptr<vtkGenericOpenGLResourceFreeCallback> ResourceCallback;
96 };
97 
98 #endif // vtkOpenGLQuadHelper_h
99 
100 // VTK-HeaderTest-Exclude: vtkOpenGLQuadHelper.h
Class to make rendering a full screen quad easier.
vtkOpenGLVertexArrayObject * VAO
unsigned int ShaderChangeValue
void ReleaseGraphicsResources(vtkWindow *)
Release graphics resources.
vtkShaderProgram * Program
vtkOpenGLQuadHelper(vtkOpenGLRenderWindow *, const char *vs, const char *fs, const char *gs, bool flipY=false)
Create a quadhelper with the provided shaders.
vtkTimeStamp ShaderSourceTime
OpenGL rendering window.
The VertexArrayObject class uses, or emulates, vertex array objects.
The ShaderProgram uses one or more Shader objects.
record modification and/or execution time
Definition: vtkTimeStamp.h:55
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39