integrated mesh import class into OpenGL,
Problem with STRP, indices are not logical
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "shader.hpp"
|
||||
#include "import.h"
|
||||
#include "Texture.h"
|
||||
#include "Object.h"
|
||||
|
||||
#define VERTEX_SHADER "Shader/VertexTextureShader.mv2shdr"
|
||||
#define FRAGMENT_SHADER "Shader/FragmentTextureShader.mv2shdr"
|
||||
@@ -280,8 +281,21 @@ void OpenGLController::loadMsh(const char * path)
|
||||
gluiSamplerID = glGetUniformLocation(gluiShaderPrgmID, "textureSampler");
|
||||
|
||||
// get data
|
||||
vfVertices = loadData();
|
||||
vfUV = loadUV();
|
||||
try
|
||||
{
|
||||
Object obj(path);
|
||||
vfVertices = obj.getVertex();
|
||||
|
||||
vfUV = obj.getUV();
|
||||
}
|
||||
catch (std::invalid_argument e)
|
||||
{
|
||||
MessageBox(NULL, e.what(), "MeshViewer 2.0 Error", MB_OK | MB_ICONERROR);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//vfVertices = loadData();
|
||||
//vfUV = loadUV();
|
||||
|
||||
glGenTextures(1, &gluiTextureID);
|
||||
glBindTexture(GL_TEXTURE_2D, gluiTextureID);
|
||||
|
Reference in New Issue
Block a user