VTK  9.1.0
vtkOpenGLRenderUtilities.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkOpenGLRenderUtilities.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
25#ifndef vtkOpenGLRenderUtilities_h
26#define vtkOpenGLRenderUtilities_h
27
28#include "vtkObject.h"
29#include "vtkRenderingOpenGL2Module.h" // For export macro
30
31#include "vtk_glew.h" // Needed for GLuint.
32#include <string> // for std::string
33
38
39class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLRenderUtilities : public vtkObject
40{
41public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
46
52 static void RenderQuad(
53 float* verts, float* tcoords, vtkShaderProgram* program, vtkOpenGLVertexArrayObject* vao);
54 static void RenderTriangles(float* verts, unsigned int numVerts, GLuint* iboData,
55 unsigned int numIndices, float* tcoords, vtkShaderProgram* program,
58
60
108 static bool PrepFullScreenVAO(
110 static void DrawFullScreenQuad();
112
113 // older signsature, we suggest you use the newer signature above
114 static bool PrepFullScreenVAO(
116
125 static void MarkDebugEvent(const std::string& event);
126
127protected:
130
131private:
133 void operator=(const vtkOpenGLRenderUtilities&) = delete;
134};
135
136#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
OpenGL buffer object.
OpenGL rendering utility functions.
static bool PrepFullScreenVAO(vtkOpenGLRenderWindow *renWin, vtkOpenGLVertexArrayObject *vao, vtkShaderProgram *prog)
Draw a full-screen quad:
static std::string GetFullScreenQuadVertexShader()
Draw a full-screen quad:
static std::string GetFullScreenQuadFragmentShaderTemplate()
Draw a full-screen quad:
static std::string GetFullScreenQuadGeometryShader()
Draw a full-screen quad:
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkOpenGLRenderUtilities() override
static void RenderTriangles(float *verts, unsigned int numVerts, GLuint *iboData, unsigned int numIndices, float *tcoords, vtkShaderProgram *program, vtkOpenGLVertexArrayObject *vao)
Helper function that draws a quad on the screen at the specified vertex coordinates and if tcoords ar...
static void RenderQuad(float *verts, float *tcoords, vtkShaderProgram *program, vtkOpenGLVertexArrayObject *vao)
Helper function that draws a quad on the screen at the specified vertex coordinates and if tcoords ar...
static bool PrepFullScreenVAO(vtkOpenGLBufferObject *vertBuf, vtkOpenGLVertexArrayObject *vao, vtkShaderProgram *prog)
static void MarkDebugEvent(const std::string &event)
Pass a debugging mark to the render engine to assist development via tools like apitrace.
static void DrawFullScreenQuad()
Draw a full-screen quad:
OpenGL rendering window.
The VertexArrayObject class uses, or emulates, vertex array objects.
The ShaderProgram uses one or more Shader objects.
@ string
Definition: vtkX3D.h:496