VTK  9.3.1
vtkOpenGLRenderUtilities.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
16 #ifndef vtkOpenGLRenderUtilities_h
17 #define vtkOpenGLRenderUtilities_h
18 
19 #include "vtkObject.h"
20 #include "vtkRenderingOpenGL2Module.h" // For export macro
21 
22 #include "vtk_glew.h" // Needed for GLuint.
23 #include <string> // for std::string
24 
25 VTK_ABI_NAMESPACE_BEGIN
29 class vtkShaderProgram;
30 
31 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLRenderUtilities : public vtkObject
32 {
33 public:
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
38 
44  static void RenderQuad(
45  float* verts, float* tcoords, vtkShaderProgram* program, vtkOpenGLVertexArrayObject* vao);
46  static void RenderTriangles(float* verts, unsigned int numVerts, GLuint* iboData,
47  unsigned int numIndices, float* tcoords, vtkShaderProgram* program,
50 
52 
97  static std::string GetFullScreenQuadVertexShader();
98  static std::string GetFullScreenQuadFragmentShaderTemplate();
99  static std::string GetFullScreenQuadGeometryShader();
100  static bool PrepFullScreenVAO(
102  static void DrawFullScreenQuad();
104 
105  // older signsature, we suggest you use the newer signature above
106  static bool PrepFullScreenVAO(
108 
117  static void MarkDebugEvent(const std::string& event);
118 
119 protected:
121  ~vtkOpenGLRenderUtilities() override;
122 
123 private:
125  void operator=(const vtkOpenGLRenderUtilities&) = delete;
126 };
127 
128 VTK_ABI_NAMESPACE_END
129 #endif
OpenGL rendering window.
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
OpenGL rendering utility functions.
a simple class to control print indentation
Definition: vtkIndent.h:28
The VertexArrayObject class uses, or emulates, vertex array objects.
OpenGL buffer object.
The ShaderProgram uses one or more Shader objects.