diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-04-19 10:05:20 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-04-19 11:42:57 +0300 |
commit | 9c5557a2ba453564ec96165d0c54752b94c21578 (patch) | |
tree | 037187841835c1902bb9647d3d81363c7cd94e70 /src/datavis3d/utils/texturehelper_p.h | |
parent | f3f8bf7f520dc04e2ae9191f89014304591de9e4 (diff) |
Correct selection method works now
Change-Id: If14437dae2a9298bfffc72b5678d401c42c3218f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavis3d/utils/texturehelper_p.h')
-rw-r--r-- | src/datavis3d/utils/texturehelper_p.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/datavis3d/utils/texturehelper_p.h b/src/datavis3d/utils/texturehelper_p.h index 7fa0816b..eb298988 100644 --- a/src/datavis3d/utils/texturehelper_p.h +++ b/src/datavis3d/utils/texturehelper_p.h @@ -58,7 +58,7 @@ QTCOMMERCIALDATAVIS3D_BEGIN_NAMESPACE -class TextureHelper: protected QOpenGLFunctions +class TextureHelper : protected QOpenGLFunctions { public: TextureHelper(); @@ -68,11 +68,18 @@ class TextureHelper: protected QOpenGLFunctions GLuint create2DTexture(const QImage &image, bool useTrilinearFiltering = false, bool convert = true); GLuint createCubeMapTexture(const QImage &image, bool useTrilinearFiltering = false); + // Returns selection framebuffer and inserts generated texture id to texture parameters + GLuint createSelectionBuffer(const QSize &size, GLuint &texture, GLuint &depthTexture); + // Returns selection texture and inserts generated framebuffers to fraembuffer parameters + GLuint createSelectionTexture(const QSize &size, GLuint &frameBuffer, GLuint &depthBuffer); + void deleteTexture(const GLuint *texture); private: QImage convertToGLFormat(const QImage &srcImage); void convertToGLFormatHelper(QImage &dstImage, const QImage &srcImage, GLenum texture_format); QRgb qt_gl_convertToGLFormatHelper(QRgb src_pixel, GLenum texture_format); + + friend class Q3DBarsPrivate; }; QTCOMMERCIALDATAVIS3D_END_NAMESPACE |