+ | Parsing textures

This commit is contained in:
TheRedShip
2025-01-27 23:56:32 +01:00
parent 6b64d2188e
commit e9c77cfdd4
12 changed files with 92 additions and 94 deletions

View File

@ -51,6 +51,7 @@ struct GPUMaterial
float metallic;
float refraction;
int type;
int texture_index;
};
struct GPUVolume
@ -107,6 +108,8 @@ class Scene
void addObject(Object *object);
void addMaterial(Material *material);
void addTexture(std::string path);
void loadTextures();
void updateLightAndObjects(int mat_id);
std::set<int> getGPULights();
@ -117,6 +120,7 @@ class Scene
const std::vector<GPUTriangle> &getTriangleData() const;
std::vector<GPUMaterial> &getMaterialData();
std::vector<GLuint> &getTextureIDs();
std::vector<GPUBvhData> &getBvhData();
std::vector<GPUBvh> &getBvh();
@ -136,6 +140,9 @@ class Scene
std::vector<GPUMaterial> _gpu_materials;
std::vector<std::string> _textures;
std::vector<GLuint> _gpu_textures;
std::set<int> _gpu_lights;
GPUVolume _gpu_volume;