mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 18:48:36 +02:00
+ | Parsing textures
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user