fixing stuff
This commit is contained in:
@@ -731,17 +731,17 @@ namespace Game
|
||||
return mat;
|
||||
}
|
||||
|
||||
uint16_t GameRendering::GetModelHandleFromPath(const char* path)
|
||||
Generated::ModelHandle GameRendering::GetModelHandleFromPath(const char* path)
|
||||
{
|
||||
uint32_t AssetHandle = CrcPath(path);
|
||||
for (int32_t i = 0; i < ModelCount; ++i)
|
||||
{
|
||||
if (Models[i].AssetHandle == AssetHandle)
|
||||
if (Models[i].Handle.Asset.Idx == AssetHandle)
|
||||
{
|
||||
return i;
|
||||
return Models[i].Handle;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return {};
|
||||
}
|
||||
|
||||
} // namespace Game
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#pragma once
|
||||
#include "bgfx/defines.h"
|
||||
#include "imgui.h"
|
||||
#include <bgfx/bgfx.h>
|
||||
#include <bx/string.h>
|
||||
#include <cstdint>
|
||||
|
||||
#include "../Gen.h"
|
||||
#include "../Global.h"
|
||||
#include "imgui.h"
|
||||
|
||||
union SDL_Event;
|
||||
|
||||
@@ -36,7 +37,7 @@ namespace Game
|
||||
bgfx::VertexBufferHandle VertexBuffer;
|
||||
bgfx::IndexBufferHandle IndexBuffer;
|
||||
bgfx::VertexLayout VertLayout;
|
||||
uint32_t AssetHandle = UINT16_MAX;
|
||||
Generated::ModelHandle Handle;
|
||||
};
|
||||
|
||||
struct Material
|
||||
@@ -118,6 +119,6 @@ namespace Game
|
||||
void HandleEvents();
|
||||
void RenderDebugUI();
|
||||
void Shutdown();
|
||||
uint16_t GetModelHandleFromPath(const char* path);
|
||||
Generated::ModelHandle GetModelHandleFromPath(const char* path);
|
||||
};
|
||||
} // namespace Game
|
||||
|
||||
Reference in New Issue
Block a user