collect all texture data and give it to the shader later,

solid color works,
texture crash
This commit is contained in:
Anakin
2016-11-08 16:42:05 +01:00
parent 9c7691df85
commit e5490b9451
2 changed files with 80 additions and 49 deletions

View File

@@ -5,6 +5,7 @@
#include <glm\glm.hpp>
#include <vector>
#include "Object.h"
#include "Texture.h"
#define VERTEX_INDEX_XYZ 0
#define VERTEX_INDEX_UV 1
@@ -23,6 +24,13 @@ struct Vertex {
GLfloat uv[2];
};
struct textureData {
bool alpha;
std::uint32_t width;
std::uint32_t height;
const GLvoid* data;
};
class OpenGLController
{
////////////////////////////////////////////////////////////////////////////////////////////
@@ -65,6 +73,7 @@ private:
// data
std::vector<Modl*> vModels;
std::vector<textureData*> vTextures;
// transformation =========================
//values