Rendu
A lightweight rendering engine for experimentations
|
Helpers to export a Rendu scene. More...
Classes | |
struct | Material |
Contain exported texture infos for a given material. More... | |
Functions | |
int | saveColor (const std::string &outputPath, const glm::vec3 &color) |
Material | saveMaterial (const std::string &baseName, const CompositeObj::Material &material, const std::string &outputDirPath) |
int | saveDescription (const std::vector< CompositeObj::Object > &objects, const std::unordered_map< std::string, Material > &materials, const std::string &outputPath) |
Variables | |
const int | textureSize = 8 |
Default uniform texture size. | |
Helpers to export a Rendu scene.
int SceneExport::saveColor | ( | const std::string & | outputPath, |
const glm::vec3 & | color | ||
) |
Save a small colored texture.
outputPath | the output image file path |
color | the color to store in the texture |
int SceneExport::saveDescription | ( | const std::vector< CompositeObj::Object > & | objects, |
const std::unordered_map< std::string, Material > & | materials, | ||
const std::string & | outputPath | ||
) |
Save a scene description, listing all objects with materials. The file can then be decoded by Codable objects.
objects | the scene objects |
materials | the scene materials |
outputPath | the destination file |
Material SceneExport::saveMaterial | ( | const std::string & | baseName, |
const CompositeObj::Material & | material, | ||
const std::string & | outputDirPath | ||
) |
Save a material parameters as a series of textures.
baseName | material base name |
material | the material to export |
outputDirPath | the output directory |