VTK
9.7.0
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
Rendering
OpenGL2
vtkOpenGLTextureComputeShaderNormalization.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
17
18
#ifndef vtkOpenGLTextureComputeShaderNormalization_h
19
#define vtkOpenGLTextureComputeShaderNormalization_h
20
21
#include "
vtkOpenGLTextureNormalizationHelper.h
"
22
#include "vtkRenderingOpenGL2Module.h"
23
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
24
#include "vtk_glad.h"
25
26
VTK_ABI_NAMESPACE_BEGIN
27
class
vtkOpenGLRenderWindow
;
28
29
#ifdef GL_COMPUTE_SHADER
30
31
class
VTKRENDERINGOPENGL2_EXPORT
VTK_MARSHALAUTO
vtkOpenGLTextureComputeShaderNormalization
32
:
public
vtkOpenGLTextureNormalizationHelper
33
{
34
public
:
35
static
vtkOpenGLTextureComputeShaderNormalization
* New();
36
vtkTypeMacro(
vtkOpenGLTextureComputeShaderNormalization
,
vtkOpenGLTextureNormalizationHelper
);
37
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
38
44
void
Initialize
(
vtkOpenGLRenderWindow
* context);
45
46
bool
ConvertUShortToFloat(
const
void
* sourceData,
size_t
numValues,
int
numComps,
47
unsigned
int
targetTexture,
unsigned
int
width,
unsigned
int
height)
override
;
48
49
bool
ConvertShortToFloat(
const
void
* sourceData,
size_t
numValues,
int
numComps,
50
unsigned
int
targetTexture,
unsigned
int
width,
unsigned
int
height)
override
;
51
52
protected
:
53
vtkOpenGLTextureComputeShaderNormalization
();
54
~vtkOpenGLTextureComputeShaderNormalization
()
override
;
55
56
vtkOpenGLRenderWindow
*
Context
=
nullptr
;
57
GLuint ComputeProgram = 0;
58
GLuint IntermediateStorageTexture = 0;
59
60
bool
InitializeComputeProgram();
61
bool
UploadToIntermediateTexture(
const
void
* sourceData,
size_t
numValues,
int
numComps,
62
unsigned
int
width,
unsigned
int
height, GLenum sourceFormat);
63
bool
RunNormalizationCompute(
64
int
numComps,
unsigned
int
targetTexture,
unsigned
int
width,
unsigned
int
height);
65
66
private
:
67
vtkOpenGLTextureComputeShaderNormalization
(
68
const
vtkOpenGLTextureComputeShaderNormalization
&) =
delete
;
69
void
operator=(
const
vtkOpenGLTextureComputeShaderNormalization
&) =
delete
;
70
};
71
72
#endif
// GL_COMPUTE_SHADER
73
74
VTK_ABI_NAMESPACE_END
75
#endif
// vtkOpenGLTextureComputeShaderNormalization_h
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:29
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition
vtkOpenGLRenderWindow.h:47
vtkOpenGLTextureComputeShaderNormalization
GPU compute shader implementation for 16-bit to float texture normalization.
vtkOpenGLTextureNormalizationHelper
GPU-based texture normalization for GLES 3.0 without GL_EXT_texture_norm16.
Definition
vtkOpenGLTextureNormalizationHelper.h:39
PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
vtkOpenGLTextureNormalizationHelper.h
Initialize
virtual void Initialize()
Context
vtkWeakPointer< vtkOpenGLRenderWindow > Context
Definition
vtkTextureObject.h:802
vtkWrappingHints.h
VTK_MARSHALAUTO
#define VTK_MARSHALAUTO
Definition
vtkWrappingHints.h:75
Generated on
for VTK by
1.18.0