summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2023-12-28 16:05:02 -0500
committerJonathan Bradley <jcb@pikum.xyz>2023-12-28 16:05:02 -0500
commit499206dcb39e9ed0c3e21e3c580f556218e0c693 (patch)
treeff5424e4678f5f83f224c99f2d469573a5e720f6 /src/window.cpp
parent2aa963fc37dbf61a008031d82e2aac87bf89f9db (diff)
EntityType falls back to a default texture if not provided
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 8aa241d..5816041 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -1,3 +1,4 @@
+#include "static/missing-texture.hpp"
#define GLFW_INCLUDE_NONE
#define GLFW_INCLUDE_VULKAN
@@ -1800,25 +1801,11 @@ void CreateGraphicsPipelines() {
result = vkCreateImageView(vkDevice, &dbgImageViewCI, vkAllocator, &pkeDebugHitbox.vkImageView);
assert(result == VK_SUCCESS);
- /*
- * 0: #373b3e (55,59,62) // dark grey (desaturated light blue)
- * 1: #bec8d1 (190,200,209) // light grey (desaturated light blue)
- * 2: #86cecb (134,206,203) // light cyan
- * 3: #137a7f (19,122,127) // dark cyan
- * 4: #e12885 (225,40,133) // magenta
- */
- // transition image layout and copy to buffer
- const uint8_t pixels[] = {
- 0x37, 0x3b, 0x3e, 0xff, // 0
- 0x86, 0xce, 0xcb, 0xff, // 2
- 0x13, 0x7a, 0x7f, 0xff, // 3
- 0xe1, 0x28, 0x85, 0xff, // 4
- };
VkBuffer transferImageBuffer;
VkDeviceMemory transferImageMemory;
void *deviceData;
BeginTransferBuffer(4 * 4, transferImageBuffer, transferImageMemory, deviceData);
- memcpy(deviceData, pixels, 4 * 4);
+ memcpy(deviceData, PKE_MISSING_TEXTURE_DATA, 4 * 4);
{
VkImageMemoryBarrier vkImageMemoryBarrier;
vkImageMemoryBarrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;