collect all texture data and give it to the shader later,
solid color works, texture crash
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user