16 #ifndef vtkOpenGLRGBTable_h_
17 #define vtkOpenGLRGBTable_h_
62 void Bind(
int textureUnit = 1)
65 glActiveTexture(GL_TEXTURE0 + textureUnit);
66 glBindTexture(GL_TEXTURE_1D, this->
TextureId);
73 bool linearInterpolation,
int textureUnit = 1)
76 glActiveTexture(GL_TEXTURE0 + textureUnit);
78 bool needUpdate =
false;
91 glBindTexture(GL_TEXTURE_1D, this->
TextureId);
94 glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S,
109 glTexImage1D(GL_TEXTURE_1D, 0, GL_RGB16, this->
TexutureWidth, 0,
110 GL_RGB, GL_FLOAT, this->
Table);
119 needUpdate = needUpdate ||
125 if (linearInterpolation)
133 glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, value);
134 glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, value);
137 glActiveTexture(GL_TEXTURE0);
155 #endif // vtkOpenGLRGBTable_h_
void GetTable(double x1, double x2, int n, double *table)
bool LastLinearInterpolation
void Update(vtkColorTransferFunction *scalarRGB, double range[2], bool linearInterpolation, int textureUnit=1)
typedef GLuint(APIENTRYP PFNGLCREATEPROGRAMPROC)(void)
record modification and/or execution time
GLsizei const GLfloat * value
virtual unsigned long GetMTime()
typedef GLint(APIENTRYP PFNGLGETATTRIBLOCATIONPROC)(GLuint program
Defines a transfer function for mapping a property to an RGB color value.
int NumberOfColorComponents
void Bind(int textureUnit=1)