Add Linux support
- Add linux build system using MakeGen - Fix a swapchain validation error, likelydue to my linux system using a different vulkan version - Make DescriptorPool take in amount of descriptors it needs, instead of allocating a mass amount for every pool, causing loads of RAM/VRAM usage
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "copium/asset/Asset.h"
|
||||
#include "copium/asset/AssetMeta.h"
|
||||
#include "copium/asset/AssetRef.h"
|
||||
#include "copium/buffer/CommandBuffer.h"
|
||||
#include "copium/sampler/ColorAttachment.h"
|
||||
@@ -44,4 +43,4 @@ namespace Copium
|
||||
void InitializeRenderPass();
|
||||
void InitializeFramebuffers();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
namespace Copium
|
||||
{
|
||||
IndexBuffer::IndexBuffer(int indexCount)
|
||||
: Buffer{VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_INDEX_BUFFER_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, indexCount * sizeof(uint16_t), 1},
|
||||
: Buffer{VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_INDEX_BUFFER_BIT,
|
||||
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT,
|
||||
indexCount * sizeof(uint16_t), 1},
|
||||
indexCount{indexCount}
|
||||
{}
|
||||
|
||||
@@ -24,4 +26,4 @@ namespace Copium
|
||||
CP_ASSERT(indices >= 0 && indices <= indexCount, "amount of indices is out of range");
|
||||
vkCmdDrawIndexed(commandBuffer, indices, 1, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,4 +84,4 @@ namespace Copium
|
||||
Buffer::Update(buffer.data(), i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user