chore: update gizmo materials

This commit is contained in:
Nick Fisher
2024-12-11 21:03:16 +08:00
parent b94aeb8b4a
commit fe0f63c4cb
7 changed files with 1972 additions and 5 deletions

View File

@@ -0,0 +1,12 @@
.global GIZMO_GIZMO_OFFSET;
.global GIZMO_GIZMO_SIZE;
.global GIZMO_PACKAGE
.section .rodata
GIZMO_PACKAGE:
.incbin "gizmo.bin"
GIZMO_GIZMO_OFFSET:
.int 0
GIZMO_GIZMO_SIZE:
.int 38039

View File

@@ -0,0 +1,12 @@
.global _GIZMO_GIZMO_OFFSET;
.global _GIZMO_GIZMO_SIZE;
.global _GIZMO_PACKAGE
.section __TEXT,__const
_GIZMO_PACKAGE:
.incbin "gizmo.bin"
_GIZMO_GIZMO_OFFSET:
.int 0
_GIZMO_GIZMO_SIZE:
.int 38039

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
#ifndef GIZMO_H_
#define GIZMO_H_
#include <stdint.h>
extern "C" {
extern const uint8_t GIZMO_PACKAGE[];
extern int GIZMO_GIZMO_OFFSET;
extern int GIZMO_GIZMO_SIZE;
}
#define GIZMO_GIZMO_DATA (GIZMO_PACKAGE + GIZMO_GIZMO_OFFSET)
#endif

View File

@@ -85,7 +85,7 @@ namespace thermion
/// @param layer
/// @param loadResourcesAsync
/// @return
SceneAsset* loadGlbFromBuffer(const uint8_t *data, size_t length, int numInstances = 1, bool keepData = false, int priority = 4, int layer = 0, bool loadResourcesAsync = false);
SceneAsset* loadGlbFromBuffer(const uint8_t *data, size_t length, int numInstances = 1, bool keepData = false, int priority = 4, int layer = 0, bool loadResourcesAsync = false, bool addToScene = true);
///
/// Creates an instance of the given entity.
@@ -321,6 +321,9 @@ namespace thermion
std::vector<MaterialInstance *> _materialInstances;
Material *_unlitFixedSizeMaterial = nullptr;
Material *_gizmoMaterial = nullptr;
SceneAsset *_gizmoGlb;
utils::NameComponentManager *_ncm;