VTK  9.6.20260619
vtkOpenGLBatchedLabeledDataMapper.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
13
14#ifndef vtkOpenGLBatchedLabeledDataMapper_h
15#define vtkOpenGLBatchedLabeledDataMapper_h
16
18#include "vtkNew.h" // For vtkNew
19#include "vtkRenderingOpenGL2Module.h" // For export macro
20#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
21
22VTK_ABI_NAMESPACE_BEGIN
23class vtkActor;
28
29class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkOpenGLBatchedLabeledDataMapper
31{
32public:
35 void PrintSelf(ostream& os, vtkIndent indent) override;
36
39
43 void SetLabelTextProperty(vtkTextProperty* p, int type) override;
44
47 void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor) override;
50
51protected:
54
55 void UploadGlyphAtlas(vtkImageData* atlas) override;
56 void ActivateGlyphTexture() override;
57 void DeactivateGlyphTexture() override;
58
59private:
61 void operator=(const vtkOpenGLBatchedLabeledDataMapper&) = delete;
62
65 vtkNew<vtkActor> DummyActor;
66
68
69 void SetupHelper();
70 bool HelperSetup = false;
71};
72
73#define vtkOpenGLBatchedLabeledDataMapper_OVERRIDE_ATTRIBUTES \
74 vtkOpenGLBatchedLabeledDataMapper::CreateOverrideAttributes()
75VTK_ABI_NAMESPACE_END
76
77#endif
a actor that draws 2D data
Definition vtkActor2D.h:145
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
void SetLabelTextProperty(vtkTextProperty *p) override
Set/Get the text property.
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Allocate and hold a VTK object.
Definition vtkNew.h:168
void RenderOpaqueGeometry(vtkViewport *viewport, vtkActor2D *actor) override
Rebuilds labels and the glyph atlas if the pipeline is stale, then issues the batched draw call throu...
static vtkOverrideAttribute * CreateOverrideAttributes()
Returns an override-attribute chain that selects this class for the OpenGL backend.
void SetLabelTextProperty(vtkTextProperty *p, int type) override
Calls the superclass and invalidates the helper's VBO attribute mapping so it is rebuilt on the next ...
void ActivateGlyphTexture() override
Called before and after the helper renders to bind/unbind the atlas texture.
void UploadGlyphAtlas(vtkImageData *atlas) override
Called by BuildLabels when the glyph atlas image has been rebuilt or updated.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ReleaseGraphicsResources(vtkWindow *) override
Releases the atlas texture object and the helper's GPU resources.
static vtkOpenGLBatchedLabeledDataMapper * New()
void DeactivateGlyphTexture() override
OpenGL rendering window.
Attribute for vtkObjectFactory overrides.
represent text properties.
abstracts an OpenGL texture object.
abstract specification for Viewports
Definition vtkViewport.h:66
window superclass for vtkRenderWindow
Definition vtkWindow.h:61
#define VTK_MARSHALAUTO