VTK  9.3.0
vtkOpenGLQuadHelper.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
37 #ifndef vtkOpenGLQuadHelper_h
38 #define vtkOpenGLQuadHelper_h
39 
40 #include "vtkRenderingOpenGL2Module.h" // for export macro
41 #include "vtkTimeStamp.h"
42 #include <memory> // for std::unique_ptr
43 
44 VTK_ABI_NAMESPACE_BEGIN
47 class vtkShaderProgram;
49 class vtkWindow;
50 
51 // Helper class to render full screen quads
52 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLQuadHelper
53 {
54 public:
58  unsigned int ShaderChangeValue;
59 
68  vtkOpenGLRenderWindow*, const char* vs, const char* fs, const char* gs, bool flipY = false);
69 
71 
72  // Draw the Quad, will bind the VAO for you
73  void Render();
74 
81 
82 private:
84  vtkOpenGLQuadHelper& operator=(const vtkOpenGLQuadHelper&) = delete;
85  std::unique_ptr<vtkGenericOpenGLResourceFreeCallback> ResourceCallback;
86 };
87 
88 VTK_ABI_NAMESPACE_END
89 #endif // vtkOpenGLQuadHelper_h
90 
91 // 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:34
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37