summaryrefslogtreecommitdiff
path: root/tizen/src/ui/displayglwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tizen/src/ui/displayglwidget.cpp')
-rw-r--r--tizen/src/ui/displayglwidget.cpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/tizen/src/ui/displayglwidget.cpp b/tizen/src/ui/displayglwidget.cpp
index 14aa91b935..e49e51608b 100644
--- a/tizen/src/ui/displayglwidget.cpp
+++ b/tizen/src/ui/displayglwidget.cpp
@@ -402,22 +402,26 @@ void DisplayGLWidget::initializeGL()
mTexCoords[10] = 0;
mTexCoords[11] = 1;
- GLuint curTexture = 0;
- mFuncs->glGetIntegerv(GL_TEXTURE_BINDING_2D, (GLint *)&curTexture);
- const QImage img = getTouchScreenHelper()->getMtTracker()->getPointImage();
- mFuncs->glGenTextures(1, &mtTexture);
- mFuncs->glBindTexture(GL_TEXTURE_2D, mtTexture);
- mFuncs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- mFuncs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- mFuncs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- mFuncs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- mFuncs->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 32, 32, 0, GL_BGRA,
- GL_UNSIGNED_INT_8_8_8_8_REV,
- (const void *)img.constBits());
- mFuncs->glBindTexture(GL_TEXTURE_2D, curTexture);
+ if (isTsEnabled) {
+ GLuint curTexture = 0;
+ mFuncs->glGetIntegerv(GL_TEXTURE_BINDING_2D, (GLint *)&curTexture);
+ const QImage img = getTouchScreenHelper()->getMtTracker()->getPointImage();
+ mFuncs->glGenTextures(1, &mtTexture);
+ mFuncs->glBindTexture(GL_TEXTURE_2D, mtTexture);
+ mFuncs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ mFuncs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ mFuncs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ mFuncs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ mFuncs->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 32, 32, 0, GL_BGRA,
+ GL_UNSIGNED_INT_8_8_8_8_REV,
+ (const void *)img.constBits());
+ mFuncs->glBindTexture(GL_TEXTURE_2D, curTexture);
+ }
if (!maskQImage.isNull()) {
+ GLuint curTexture = 0;
+ mFuncs->glGetIntegerv(GL_TEXTURE_BINDING_2D, (GLint *)&curTexture);
mFuncs->glGenTextures(1, &maskTexture);
mFuncs->glBindTexture(GL_TEXTURE_2D, maskTexture);
mFuncs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);