VTK  9.4.20241010
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
44VTK_ABI_NAMESPACE_BEGIN
49class vtkWindow;
50
51// Helper class to render full screen quads
52class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLQuadHelper
53{
54public:
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
82private:
84 vtkOpenGLQuadHelper& operator=(const vtkOpenGLQuadHelper&) = delete;
85 std::unique_ptr<vtkGenericOpenGLResourceFreeCallback> ResourceCallback;
86};
87
88VTK_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
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.
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
window superclass for vtkRenderWindow
Definition vtkWindow.h:48