rle and 24bit support,
need to write direct into image for performance
This commit is contained in:
@@ -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());
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include <QFileDialog>
|
||||
#include <QFile>
|
||||
#include <QPalette>
|
||||
#include "..\Header\FileInterface.h"
|
||||
|
||||
#define WINDOW_NAME "Mesh Viewer"
|
||||
|
||||
|
Reference in New Issue
Block a user