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;
|
VkImageView view;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct Texture {
|
||||||
|
VkImage image;
|
||||||
|
VmaAllocation allocation;
|
||||||
|
// TODO
|
||||||
|
};
|
||||||
|
|
||||||
struct Swapchain {
|
struct Swapchain {
|
||||||
VkSwapchainKHR swapchain = VK_NULL_HANDLE;
|
VkSwapchainKHR swapchain = VK_NULL_HANDLE;
|
||||||
|
|
||||||
@ -1394,11 +1400,12 @@ namespace engine {
|
|||||||
bufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
bufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||||
|
|
||||||
VmaAllocationCreateInfo allocInfo{};
|
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.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT;
|
||||||
allocInfo.requiredFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_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);
|
assert(res == VK_SUCCESS);
|
||||||
|
|
||||||
pipeline->uniformBuffers[i] = buf;
|
pipeline->uniformBuffers[i] = buf;
|
||||||
|
@ -130,7 +130,6 @@ namespace engine {
|
|||||||
addInputButtonAsAxis(name, InputDevice::MOUSE, static_cast<int>(high), static_cast<int>(low));
|
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)
|
void Input::addInputButton(const std::string& name, inputs::Key button)
|
||||||
{
|
{
|
||||||
addInputButton(name, InputDevice::KEYBOARD, static_cast<int>(button));
|
addInputButton(name, InputDevice::KEYBOARD, static_cast<int>(button));
|
||||||
@ -234,4 +233,4 @@ namespace engine {
|
|||||||
return isReleased;
|
return isReleased;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,9 +23,6 @@ set(GAME_SOURCES
|
|||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
add_executable(${PROJECT_NAME} WIN32 ${GAME_SOURCES} "game.rc")
|
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()
|
else()
|
||||||
add_executable(${PROJECT_NAME} ${GAME_SOURCES})
|
add_executable(${PROJECT_NAME} ${GAME_SOURCES})
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user