VAPOR3 3.9.4
VolumeGLSL.h
Go to the documentation of this file.
1#pragma once
2
4#include <vapor/Texture.h>
6
7namespace VAPoR {
8
16
18public:
21
22 virtual void SaveDepthBuffer(bool fast);
23 virtual int Render(bool fast);
24 virtual int LoadData(const Grid *grid);
25 virtual ShaderProgram *GetShader() const = 0;
26 virtual void SetUniforms(const ShaderProgram *shader) const = 0;
27 virtual void GetFinalBlendingMode(int *src, int *dst);
28
29private:
30 Texture1D _LUTTexture;
31 Texture1D _LUT2Texture;
32 Texture2D _depthTexture;
33 MapperFunction *_tf = 0, *_tf2 = 0;
34 vector<double> _minDataExtents, _maxDataExtents;
35 vector<float> _constantColor;
36
37 void _loadTF();
38 void _loadTF(Texture1D *texture, MapperFunction *tf, MapperFunction **cacheTF);
39 void _getLUTFromTF(const MapperFunction *tf, float *LUT) const;
40
41 void _setShaderUniforms(const ShaderProgram *shader, const bool fast) const;
42 glm::vec3 _getVolumeScales() const;
43 void _getExtents(glm::vec3 *dataMin, glm::vec3 *dataMax, glm::vec3 *userMin, glm::vec3 *userMax) const;
44 bool _usingColorMapData() const;
45};
46} // namespace VAPoR
Abstract base class for a 2D or 3D structured or unstructured grid.
Definition: Grid.h:56
Parent class for TransferFunction and IsoControl, supports positioning histogram over color/opacity m...
Provides a C++ interface to the OpenGL shader program construct.
Definition: ShaderProgram.h:25
Strategy pattern for volume rendering algorithms.
Volume rendering algorithms using GLSL.
Definition: VolumeGLSL.h:17
virtual void SetUniforms(const ShaderProgram *shader) const =0
virtual int Render(bool fast)
virtual ShaderProgram * GetShader() const =0
VolumeGLSL(GLManager *gl, VolumeRenderer *renderer)
virtual void SaveDepthBuffer(bool fast)
virtual void GetFinalBlendingMode(int *src, int *dst)
virtual int LoadData(const Grid *grid)
Contains references to context scope OpenGL data.
Definition: GLManager.h:18