VTK  9.1.0
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=========================================================================*/
43#ifndef vtkOpenGLQuadHelper_h
44#define vtkOpenGLQuadHelper_h
45
46#include "vtkRenderingOpenGL2Module.h" // for export macro
47#include "vtkTimeStamp.h"
48#include <memory> // for std::unique_ptr
49
54class vtkWindow;
55
56// Helper class to render full screen quads
57class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLQuadHelper
58{
59public:
63 unsigned int ShaderChangeValue;
64
65 // create a quadhelper with the provided shaders
66 // if the vertex is nullptr
67 // then the default is used. Note that this
68 // class should be destroyed upon
69 // ReleaseGraphicsResources
70 vtkOpenGLQuadHelper(vtkOpenGLRenderWindow*, const char* vs, const char* fs, const char* gs);
71
73
74 // Draw the Quad, will bind the VAO for you
75 void Render();
76
83
84private:
86 vtkOpenGLQuadHelper& operator=(const vtkOpenGLQuadHelper&) = delete;
87 std::unique_ptr<vtkGenericOpenGLResourceFreeCallback> ResourceCallback;
88};
89
90#endif // vtkOpenGLQuadHelper_h
91
92// VTK-HeaderTest-Exclude: vtkOpenGLQuadHelper.h
Class to make rendering a full screen quad easier.
vtkOpenGLVertexArrayObject * VAO
vtkOpenGLQuadHelper(vtkOpenGLRenderWindow *, const char *vs, const char *fs, const char *gs)
unsigned int ShaderChangeValue
void ReleaseGraphicsResources(vtkWindow *)
Release graphics resources.
vtkShaderProgram * Program
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:52
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39