This commit is contained in:
h4570
2022-08-29 19:00:47 +02:00
parent 2ae1ccd761
commit e359bcbe2b
30 changed files with 174 additions and 152 deletions
+3 -6
View File
@@ -76,12 +76,9 @@ void Tutorial07::loadMeshWithLightmap() {
auto data = ObjLoader::load(FileUtils::fromCwd("cup.obj"), options);
/**
* We don't want to load texture coordinates,
* because this obj file has no texture.
*
* Anyways you can use texture as well.
* This model has no texture (it was exported without UV data),
* but you can use lighting with textures as well.
*/
data->textureCoordsEnabled = false;
/** Lets add lightmap manually */
setLightmap(data.get());
@@ -120,7 +117,7 @@ void Tutorial07::setDirectionalLightsOptions() {
void Tutorial07::setLightmap(MeshBuilderData* data) {
/** Information for mesh, that data has lightmap */
data->lightMapEnabled = true;
data->loadLightmap = true;
/** This object file has only 1 material */
auto* material = data->materials[0];