summaryrefslogtreecommitdiff
path: root/src/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer')
-rw-r--r--src/renderer/backends/backend_vulkan.c2
-rw-r--r--src/renderer/ral_types.h1
-rw-r--r--src/renderer/render.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/renderer/backends/backend_vulkan.c b/src/renderer/backends/backend_vulkan.c
index 208aef0..ae49cc3 100644
--- a/src/renderer/backends/backend_vulkan.c
+++ b/src/renderer/backends/backend_vulkan.c
@@ -446,7 +446,7 @@ gpu_pipeline* gpu_graphics_pipeline_create(struct graphics_pipeline_desc descrip
// TODO: Generate this from descroiption now
VkVertexInputBindingDescription binding_desc;
binding_desc.binding = 0;
- binding_desc.stride = description.vertex_desc.stride;
+ binding_desc.stride = description.vertex_desc.use_full_vertex_size ? sizeof(vertex) : description.vertex_desc.stride;
binding_desc.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
VkPipelineVertexInputStateCreateInfo vertex_input_info = {
diff --git a/src/renderer/ral_types.h b/src/renderer/ral_types.h
index fc8bb8b..8339625 100644
--- a/src/renderer/ral_types.h
+++ b/src/renderer/ral_types.h
@@ -160,6 +160,7 @@ typedef struct vertex_description {
vertex_attrib_type attributes[MAX_VERTEX_ATTRIBUTES];
u32 attributes_count;
size_t stride;
+ bool use_full_vertex_size;
} vertex_description;
// --- Shaders & Bindings
diff --git a/src/renderer/render.c b/src/renderer/render.c
index fc45093..9f9a97c 100644
--- a/src/renderer/render.c
+++ b/src/renderer/render.c
@@ -209,7 +209,7 @@ texture_data texture_data_load(const char* path, bool invert_y) {
stbi_set_flip_vertically_on_load(invert_y);
#pragma GCC diagnostic ignored "-Wpointer-sign"
- char* data = stbi_load(path, &width, &height, &num_channels, 0); // STBI_rgb_alpha);
+ char* data = stbi_load(path, &width, &height, &num_channels, STBI_rgb_alpha);
if (data) {
DEBUG("loaded texture: %s", path);
} else {