- Introduce Mesh3D class with vertices, texture, VBO/VAO. - Replace Object3D struct and textures map in engine with Mesh3D objects. - Update createObject to load from file path instead of vertex array. - Adjust cube rendering to use new vertex count. - Remove debug prints from Texture2D loading. - Toggle fragment shader color vs texture usage.
25 lines
413 B
C++
25 lines
413 B
C++
#ifndef _MESH3D
|
|
#define _MESH3D
|
|
|
|
#include "Texture2D.h"
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
namespace djalim {
|
|
|
|
class Mesh3D {
|
|
public:
|
|
Mesh3D();
|
|
Mesh3D(const std::string& filepath);
|
|
std::vector<float> meshVertices;
|
|
int numMeshVertices = 0;
|
|
void loadOBJFile(const std::string& filepath);
|
|
Texture2D texture;
|
|
GLuint VBO;
|
|
GLuint VAO;
|
|
};
|
|
}
|
|
|
|
#endif // !_MESH3D
|
|
|