-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reworked material management #264
Conversation
your change shouldn't affect the visual appearance, so why the testdata has to be updated? Or it was broken before? |
The update of CMake/common is necessary? It's the latest version? |
brayns/common/engine/Engine.h
Outdated
@@ -98,15 +98,16 @@ class Engine | |||
|
|||
/** | |||
Initializes materials for the current scene | |||
@param materialType Predefined sets of colors | |||
@param colorMap Predefined color map | |||
MT_DEFAULT: Random colors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those MT_* values are no longer correct, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc is now in the types.h file. Removed.
for (size_t i = 0; i < 6; ++i) | ||
// Cornell box | ||
Material material; | ||
material.setColor(colors[i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor for Material to take some/all of this values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hum... it's either all or none, some would be a bit weird to me. And having them all makes it a long list of arguments. Maybe another idea would to be to define some presets, like Metal, Glass, etc?
brayns/common/scene/Scene.cpp
Outdated
file.write((char*)&boolean, sizeof(bool)); | ||
// TODO: Textures | ||
} | ||
|
||
// Save geometry | ||
for (auto& material : _materials) | ||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
brayns/common/scene/Scene.h
Outdated
|
||
/** | ||
Commit materials to renderers | ||
@param updateOnly If true, materials are not recreated and textures are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
brayns/io/MeshLoader.cpp
Outdated
@@ -33,6 +33,9 @@ | |||
|
|||
#include <brayns/common/scene/Scene.h> | |||
|
|||
#define BRAYNS_USE_ASSIMP \ | |||
1 //************* REMOVE BEFORE PUSH ****************** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment was obliviously not big enough... 🙈
Regarding the new test file, the current one is broken and does now process material. This PR fixes the problem. |
No description provided.