removed components
This commit is contained in:
parent
0c6934023b
commit
9bf96e615c
3 changed files with 29 additions and 25 deletions
|
|
@ -33,7 +33,7 @@ import :VulkanBuffer;
|
|||
|
||||
namespace Crafter {
|
||||
export template <typename PixelType>
|
||||
class VulkanTexture : public Component {
|
||||
class VulkanTexture {
|
||||
public:
|
||||
VkImage image;
|
||||
VkDeviceMemory imageMemory;
|
||||
|
|
@ -107,11 +107,8 @@ namespace Crafter {
|
|||
VulkanDevice::CHECK_VK_RESULT(vkCreateImageView(VulkanDevice::device, &viewInfo, nullptr, &imageView));
|
||||
}
|
||||
|
||||
static VulkanTexture<PixelType>* FromAsset(const char* asset, VkCommandBuffer cmd) {
|
||||
std::uint32_t width = reinterpret_cast<const std::uint32_t*>(asset)[0];
|
||||
std::uint32_t height = reinterpret_cast<const std::uint32_t*>(asset)[1];
|
||||
const PixelType* pixels = reinterpret_cast<const PixelType*>(reinterpret_cast<const std::uint32_t*>(asset)+2);
|
||||
return new VulkanTexture<PixelType>(width, height, pixels, cmd);
|
||||
VulkanTexture(const char* asset, VkCommandBuffer cmd) : VulkanTexture(reinterpret_cast<const std::uint32_t*>(asset)[0], reinterpret_cast<const std::uint32_t*>(asset)[1], reinterpret_cast<const PixelType*>(reinterpret_cast<const std::uint32_t*>(asset)+2), cmd) {
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue