VTK  9.6.20260515
vtkOpenGLTextureCPUNormalization.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
14
15#ifndef vtkOpenGLTextureCPUNormalization_h
16#define vtkOpenGLTextureCPUNormalization_h
17
19#include "vtkRenderingOpenGL2Module.h"
20#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
21#include "vtk_glad.h"
22#include <vector>
23
24VTK_ABI_NAMESPACE_BEGIN
25
26class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkOpenGLTextureCPUNormalization
28{
29public:
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
34 bool ConvertUShortToFloat(const void* sourceData, size_t numValues, int numComps,
35 unsigned int targetTexture, unsigned int width, unsigned int height) override;
36
37 bool ConvertShortToFloat(const void* sourceData, size_t numValues, int numComps,
38 unsigned int targetTexture, unsigned int width, unsigned int height) override;
39
40protected:
43
44 // Reusable buffer to avoid repeated allocations
45 std::vector<float> ConversionBuffer;
46
47private:
49 void operator=(const vtkOpenGLTextureCPUNormalization&) = delete;
50};
51
52VTK_ABI_NAMESPACE_END
53#endif // vtkOpenGLTextureCPUNormalization_h
a simple class to control print indentation
Definition vtkIndent.h:108
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool ConvertUShortToFloat(const void *sourceData, size_t numValues, int numComps, unsigned int targetTexture, unsigned int width, unsigned int height) override
Convert unsigned short texture data to float in GPU memory.
~vtkOpenGLTextureCPUNormalization() override=default
bool ConvertShortToFloat(const void *sourceData, size_t numValues, int numComps, unsigned int targetTexture, unsigned int width, unsigned int height) override
Convert signed short texture data to float in GPU memory.
static vtkOpenGLTextureCPUNormalization * New()
#define VTK_MARSHALAUTO