添加多模型渲染,添加贴图渲染,添加平行光, 暂时不上传assets

This commit is contained in:
2026-09-21 14:07:20 +08:00
parent 381b7c0aa6
commit 7d628f8d8a
37 changed files with 9817 additions and 189 deletions
+30
View File
@@ -0,0 +1,30 @@
//
// Created by atdunbg on 2026/9/21.
//
#include <Engine/Renderer/Material.h>
#include <Engine/Vulkan/Device.h>
#include <Engine/Vulkan/MemoryAllocator.h>
#include <Engine/Vulkan/DescriptorManager.h>
#include <Engine/Vulkan/Texture.h>
#include <Engine/Core/Log.h>
namespace Engine
{
Material::Material(Device& device,
DescriptorManager& descriptorManager,
vk::DescriptorSetLayout layout,
Texture* texture)
: m_Texture(texture)
{
m_DescriptorSet = descriptorManager.AllocateDescriptorSet(layout);
descriptorManager.UpdateTexture(
m_DescriptorSet, 0,
m_Texture->GetSampler(),
m_Texture->GetView());
}
Material::~Material() = default;
} // namespace Engine