feat: Rename Gizmo material to UnlitFixedSize, and expose methods for using this material on other entities. Also exposes new methods for setting single float parameters.

This commit is contained in:
Nick Fisher
2024-10-31 22:34:51 +08:00
parent 91d653b288
commit bfdda4a7cc
31 changed files with 1813 additions and 1634 deletions

View File

@@ -19,16 +19,17 @@
#include <filament/InstanceBuffer.h>
#include <utils/NameComponentManager.h>
#include "CustomGeometry.hpp"
#include "tsl/robin_map.h"
#include "APIBoundaryTypes.h"
#include "CustomGeometry.hpp"
#include "Gizmo.hpp"
#include "GridOverlay.hpp"
#include "ResourceBuffer.hpp"
#include "components/CollisionComponentManager.hpp"
#include "components/AnimationComponentManager.hpp"
#include "tsl/robin_map.h"
namespace thermion
{
@@ -287,6 +288,8 @@ namespace thermion
return _ubershaderProvider;
}
MaterialInstance* createUnlitFixedSizeMaterialInstance();
MaterialInstance* createUnlitMaterialInstance();
void setVisibilityLayer(EntityId entityId, int layer);
@@ -298,6 +301,8 @@ namespace thermion
size_t getCameraCount();
Camera* getCameraAt(size_t index);
Gizmo *createGizmo(View *view, Scene *scene);
bool isGizmoEntity(utils::Entity entity);
@@ -321,6 +326,8 @@ namespace thermion
std::mutex _stencilMutex;
std::vector<MaterialInstance*> _materialInstances;
Material* _gizmoMaterial = nullptr;
utils::NameComponentManager *_ncm;
tsl::robin_map<