|
@@ -32,8 +32,8 @@
|
|
|
#include "ctkTransferFunctionScene.h"
|
|
|
|
|
|
#include <windows.h>
|
|
|
-#include <gl\gl.h> // Header File For The OpenGL32 Library
|
|
|
-#include <gl\glu.h> // Header File For The GLu32 Library
|
|
|
+#include <gl\gl.h> // Header File For The OpenGL32 Library
|
|
|
+#include <gl\glu.h> // Header File For The GLu32 Library
|
|
|
|
|
|
|
|
|
class ctkTransferFunctionNativeItemPrivate:public ctkPrivate<ctkTransferFunctionNativeItem>
|
|
@@ -55,9 +55,9 @@ void ctkTransferFunctionNativeItemPrivate::initTexture()
|
|
|
glGenTextures(1, &this->Texture[0]);
|
|
|
|
|
|
glBindTexture(GL_TEXTURE_2D, this->Texture[0]);
|
|
|
- if (!glIsTexture(this->Texture[0]))
|
|
|
- {
|
|
|
- qDebug() << "pb texture";
|
|
|
+ if (!glIsTexture(this->Texture[0]))
|
|
|
+ {
|
|
|
+ qDebug() << "pb texture";
|
|
|
}
|
|
|
float transferFunction[12] = {0.,0.,0.,1.,0.,0.,0.,1.,0.,0.,0.,1.};
|
|
|
glTexImage2D(GL_TEXTURE_2D, 0, 3, 4, 1, 0, GL_RGB, GL_FLOAT, transferFunction);
|
|
@@ -107,10 +107,10 @@ void ctkTransferFunctionNativeItem::paint(
|
|
|
//glDisable(GL_DEPTH_TEST);
|
|
|
//glDepthFunc(GL_LEQUAL);
|
|
|
glBindTexture(GL_TEXTURE_2D, d->Texture[0]);
|
|
|
- glBegin(GL_QUADS);
|
|
|
- glTexCoord2f(0.0f, 0.0f); glVertex2f(0.0f, 0.0f);
|
|
|
- glTexCoord2f(0.0f, 1.0f); glVertex2f(0.0f, 1.0f);
|
|
|
- glTexCoord2f(1.0f, 1.0f); glVertex2f(1.0f, 1.0f);
|
|
|
+ glBegin(GL_QUADS);
|
|
|
+ glTexCoord2f(0.0f, 0.0f); glVertex2f(0.0f, 0.0f);
|
|
|
+ glTexCoord2f(0.0f, 1.0f); glVertex2f(0.0f, 1.0f);
|
|
|
+ glTexCoord2f(1.0f, 1.0f); glVertex2f(1.0f, 1.0f);
|
|
|
glTexCoord2f(1.0f, 1.0f); glVertex2f(1.0f, 0.0f);
|
|
|
glEnd();
|
|
|
painter->endNativePainting();
|