添加多模型渲染,添加贴图渲染,添加平行光, 暂时不上传assets
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user