add method for setting material color

This commit is contained in:
Nick Fisher
2023-08-19 13:52:57 +08:00
parent ed72c16724
commit 042439a72b
7 changed files with 823 additions and 754 deletions

View File

@@ -40,6 +40,7 @@ namespace polyvox {
const utils::Entity* getLightEntities(EntityId e) const noexcept;
size_t getLightEntityCount(EntityId e) const noexcept;
void updateAnimations();
bool setMaterialColor(EntityId e, const char* meshName, int materialInstance, const float r, const float g, const float b, const float a);
bool setMorphAnimationBuffer(
EntityId entityId,

View File

@@ -82,6 +82,7 @@ void remove_asset(const void* const viewer, EntityId asset);
void clear_assets(const void* const viewer);
void load_texture(void* assetManager, EntityId asset, const char *assetPath, int renderableIndex);
void set_texture(void* assetManager, EntityId asset);
bool set_material_color(void* assetManager, EntityId asset, const char* meshName, int materialIndex, const float r, const float g, const float b, const float a);
void transform_to_unit_cube(void* assetManager, EntityId asset);
void set_position(void* assetManager, EntityId asset, float x, float y, float z);
void set_rotation(void* assetManager, EntityId asset, float rads, float x, float y, float z);