mirror of
https://github.com/bailwillharr/engine.git
synced 2024-09-21 04:51:18 +00:00
Remove old TODO; begin texture impl.
This commit is contained in:
parent
52009da6fa
commit
d4106091cd
@ -65,6 +65,12 @@ namespace engine {
|
||||
VkImageView view;
|
||||
};
|
||||
|
||||
struct Texture {
|
||||
VkImage image;
|
||||
VmaAllocation allocation;
|
||||
// TODO
|
||||
};
|
||||
|
||||
struct Swapchain {
|
||||
VkSwapchainKHR swapchain = VK_NULL_HANDLE;
|
||||
|
||||
@ -1394,11 +1400,12 @@ namespace engine {
|
||||
bufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||
|
||||
VmaAllocationCreateInfo allocInfo{};
|
||||
allocInfo.usage = VMA_MEMORY_USAGE_AUTO_PREFER_HOST; // prefer CPU memory for uniforms
|
||||
allocInfo.usage = VMA_MEMORY_USAGE_AUTO;
|
||||
allocInfo.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT;
|
||||
allocInfo.requiredFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
||||
|
||||
res = vmaCreateBuffer(pimpl->allocator, &bufferInfo, &allocInfo, &buf->buffer, &buf->allocation, nullptr);
|
||||
VmaAllocationInfo resultingAlloc;
|
||||
res = vmaCreateBuffer(pimpl->allocator, &bufferInfo, &allocInfo, &buf->buffer, &buf->allocation, &resultingAlloc);
|
||||
assert(res == VK_SUCCESS);
|
||||
|
||||
pipeline->uniformBuffers[i] = buf;
|
||||
|
@ -130,7 +130,6 @@ namespace engine {
|
||||
addInputButtonAsAxis(name, InputDevice::MOUSE, static_cast<int>(high), static_cast<int>(low));
|
||||
}
|
||||
|
||||
// Add a keyboard input (TODO: add KeyboardButton enum class)
|
||||
void Input::addInputButton(const std::string& name, inputs::Key button)
|
||||
{
|
||||
addInputButton(name, InputDevice::KEYBOARD, static_cast<int>(button));
|
||||
|
@ -23,9 +23,6 @@ set(GAME_SOURCES
|
||||
|
||||
if (WIN32)
|
||||
add_executable(${PROJECT_NAME} WIN32 ${GAME_SOURCES} "game.rc")
|
||||
|
||||
file(GLOB_RECURSE RES_FILES "${PROJECT_SOURCE_DIR}/res/*")
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}/res" PREFIX "Resources" FILES ${RES_FILES})
|
||||
else()
|
||||
add_executable(${PROJECT_NAME} ${GAME_SOURCES})
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user