rle and 24bit support,

need to write direct into image for performance
This commit is contained in:
Anakin
2017-01-05 11:31:36 +01:00
parent 552f86bf2d
commit 0bbc0da324
4 changed files with 143 additions and 7 deletions

View File

@@ -2,6 +2,7 @@
#include "..\Header\MshFile.h"
#include "..\Header\OglViewerWidget.h"
#include "..\Header\MainWindow.h"
#include "..\Header\tga.h"
#include <cmath>
@@ -110,13 +111,8 @@ void GeometryEngine::loadFile(const char* filePath)
void GeometryEngine::loadTexture(const char* filePath)
{
QImage img;
if (!img.load(filePath))
{
img = QImage(1, 1, QImage::Format_RGB32);
img.fill(Qt::red);
}
bool loadSuccess;
QImage img = loadTga(filePath, loadSuccess);
// Load image to OglTexture
QOpenGLTexture* new_texture = new QOpenGLTexture(img.mirrored());

View File

@@ -5,6 +5,7 @@
#include <QFileDialog>
#include <QFile>
#include <QPalette>
#include "..\Header\FileInterface.h"
#define WINDOW_NAME "Mesh Viewer"