This commit is contained in:
2026-04-27 01:51:11 +08:00
parent 0569b07d58
commit 8bc7316134
5 changed files with 9 additions and 10 deletions
-6
View File
@@ -66,12 +66,6 @@ endif()
include_directories(${CMAKE_SOURCE_DIR}/dl)
# linux 无法识别上面的头文件目录
# 防止windows不识别头文件修改
target_include_directories(${PROJECT_NAME}
PRIVATE
${CMAKE_SOURCE_DIR}/dl
)
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
#set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 23)
endif()
+1 -1
View File
@@ -404,7 +404,7 @@ void split_no_empty(const T& container, V delimiter, std::vector<T>& ret)
else
{
//分隔符位置
auto iter_find = find(iter_begin, container.end(), delimiter);
auto iter_find = std::find(iter_begin, container.end(), delimiter);
if (iter_find == container.end())
{//分隔符 未找到(说明字符串读完了,最后没有分隔符的情况)
+1 -1
View File
@@ -295,7 +295,7 @@ dl::Buffer DecryptAes256(BufferView buf, const Aes256Key& key)
{
return {};
}
std::array<std::byte, 256> HashSha256(BufferView buf)
std::array<std::byte, 32> HashSha256(BufferView buf)
{
return {};
}
+1 -1
View File
@@ -18,7 +18,7 @@ void LightDir::RenderDebug(const Position3& pos)
Color col = createColor(_s, 1.0f);
// 绘制向量
Position3 v = Math::Normalize(std::as_const(_d));
Position3 v = Math::Normalize(dl::as_const(_d));
Position3 p1 = pos + v * 1.0f;
g_gfx->SetColor(col);
+6 -1
View File
@@ -103,7 +103,7 @@ constexpr size_t NUM_MAX_FRAME_IN_FLIGHT = 2;
// 最大图元数
constexpr size_t NUM_MAX_PRIMITIVE = 1024;
// 最大材质数(ubMaterial)
constexpr size_t NUM_MAX_MATERIAL = 50;
constexpr size_t NUM_MAX_MATERIAL = 256;
// 最大骨骼实例(ubBone)
constexpr size_t NUM_MAX_BONE = 128;
// 单个实例最大骨骼数(ubBone[96])与shader一致
@@ -633,6 +633,11 @@ public:
return i;
}
size_t id = _allMaterial.size();
if (id >= NUM_MAX_MATERIAL)
{
log_warn("材质数超过上限!");
return 0;
}
void* data;
vkMapMemory(_device, _ubMaterialMemory[id], 0, sizeof(m), 0, &data);
memcpy(data, &m, sizeof(m));