summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/utils/texturehelper.cpp
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-10-21 13:19:29 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-10-21 13:22:18 +0300
commit1344723a7fee31853d27acdf25387df6d25eacba (patch)
treef0e2ae4709945de62e40407d0587489f6f7ec95d /src/datavisualization/utils/texturehelper.cpp
parentef46a70dbed0f8dd302798ba1833b7e155ccd6bb (diff)
Removed obsolete function
Change-Id: Ic52f1a4775453a4db910ea27b172f82554f7a9b6 Change-Id: Ic52f1a4775453a4db910ea27b172f82554f7a9b6 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Diffstat (limited to 'src/datavisualization/utils/texturehelper.cpp')
-rw-r--r--src/datavisualization/utils/texturehelper.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/datavisualization/utils/texturehelper.cpp b/src/datavisualization/utils/texturehelper.cpp
index dc5a504a..9e2b9811 100644
--- a/src/datavisualization/utils/texturehelper.cpp
+++ b/src/datavisualization/utils/texturehelper.cpp
@@ -99,53 +99,6 @@ GLuint TextureHelper::createCubeMapTexture(const QImage &image, bool useTrilinea
return textureId;
}
-GLuint TextureHelper::createSelectionBuffer(const QSize &size, GLuint &texture,
- GLuint &depthTexture)
-{
- GLuint framebuffer;
-
- // Create frame buffer
- glGenFramebuffers(1, &framebuffer);
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer);
-
- // Create texture for the selection buffer
- glGenTextures(1, &texture);
- glBindTexture(GL_TEXTURE_2D, texture);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-//#if !defined(QT_OPENGL_ES_2)
-// glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size.width(), size.height(), 0, GL_RGB,
-// GL_UNSIGNED_BYTE, NULL);
-//#else
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, size.width(), size.height(), 0, GL_RGB,
- GL_UNSIGNED_BYTE, NULL);
-//#endif
-
- // Create texture object for the depth buffer
- glGenTextures(1, &depthTexture);
- glBindTexture(GL_TEXTURE_2D, depthTexture);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, size.width(), size.height(),
- 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL);
- glBindTexture(GL_TEXTURE_2D, 0);
-
- // Attach texture to color attachment
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0);
- // Attach texture to depth attachment
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depthTexture, 0);
-
- // Verify that the frame buffer is complete
- GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
- if (status != GL_FRAMEBUFFER_COMPLETE) {
- qCritical() << "Frame buffer creation failed" << status;
- return 0;
- }
-
- // Restore the default framebuffer
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
-
- return framebuffer;
-}
-
GLuint TextureHelper::createSelectionTexture(const QSize &size, GLuint &frameBuffer,
GLuint &depthBuffer)
{