Skip to content
Snippets Groups Projects
Commit e8f64be6 authored by Martin Schultz's avatar Martin Schultz
Browse files

use utility class for image conversion

parent b6adacd1
No related branches found
No related tags found
1 merge request!64sync with Unstable
......@@ -51,6 +51,7 @@
#include <ACG/GL/globjects.hh>
#include <ACG/GL/GLFormatInfo.hh>
#include <ACG/ShaderUtils/GLSLShader.hh>
#include <ACG/Utils/ImageConversion.hh>
#include <QImage>
#include <QGLWidget>
......@@ -640,7 +641,7 @@ bool Texture2D::loadFromFile( const std::string& _filename, GLenum _minFilter, G
if (mipmaps)
autogenerateMipMaps();
QImage gltex = QGLWidget::convertToGLFormat ( qtex );
QImage gltex = ACG::Util::convertToGLFormat(gltex);
setData(0, GL_RGBA, gltex.width(), gltex.height(), GL_RGBA, GL_UNSIGNED_BYTE, gltex.bits());
}
......
......@@ -63,6 +63,7 @@
#include <ACG/GL/acg_glew.hh>
#include "TextNode.hh"
#include "../Utils/ImageConversion.hh"
//== NAMESPACES ===============================================================
......@@ -405,7 +406,7 @@ updateFont() {
painter.end();
// convert finalImage to an OpenGL friendly format
finalImage = QGLWidget::convertToGLFormat(finalImage);
finalImage = ACG::Util::convertToGLFormat(finalImage);
// generate a new texture from finalImage
if (!texture_)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment