VTK  9.6.20260515
vtkOpenGLTextureFramebufferNormalization.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
22
23#ifndef vtkOpenGLTextureFramebufferNormalization_h
24#define vtkOpenGLTextureFramebufferNormalization_h
25
27#include "vtkRenderingOpenGL2Module.h"
28#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
29#include "vtk_glad.h"
30
31VTK_ABI_NAMESPACE_BEGIN
33
36{
37public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
48
49 bool ConvertUShortToFloat(const void* sourceData, size_t numValues, int numComps,
50 unsigned int targetTexture, unsigned int width, unsigned int height) override;
51
52 bool ConvertShortToFloat(const void* sourceData, size_t numValues, int numComps,
53 unsigned int targetTexture, unsigned int width, unsigned int height) override;
54
55protected:
58
63 GLuint ConversionVAO = 0;
64
66 bool UploadToIntermediateTexture(const void* sourceData, size_t numValues, int numComps,
67 unsigned int width, unsigned int height, GLenum internalFormat, GLenum dataFormat);
68 bool PerformFramebufferConversion(unsigned int targetTexture, int numComps, unsigned int width,
69 unsigned int height, float scaleFactor);
70
71private:
74 void operator=(const vtkOpenGLTextureFramebufferNormalization&) = delete;
75};
76
77VTK_ABI_NAMESPACE_END
78#endif // vtkOpenGLTextureFramebufferNormalization_h
a simple class to control print indentation
Definition vtkIndent.h:108
OpenGL rendering window.
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.
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.
bool PerformFramebufferConversion(unsigned int targetTexture, int numComps, unsigned int width, unsigned int height, float scaleFactor)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Initialize(vtkOpenGLRenderWindow *context)
Initialize the framebuffer conversion helper with the given render window context.
static vtkOpenGLTextureFramebufferNormalization * New()
bool UploadToIntermediateTexture(const void *sourceData, size_t numValues, int numComps, unsigned int width, unsigned int height, GLenum internalFormat, GLenum dataFormat)
#define VTK_MARSHALAUTO