diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/gltf.hpp | 4 | ||||
| -rw-r--r-- | include/vk-renderer.hpp | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/include/gltf.hpp b/include/gltf.hpp index 2f7377a..6e89509 100644 --- a/include/gltf.hpp +++ b/include/gltf.hpp @@ -16,8 +16,8 @@ struct node { };
struct raw_image {
- int32_t x;
- int32_t y;
+ int32_t width;
+ int32_t height;
int32_t channels;
uint8_t *data;
};
diff --git a/include/vk-renderer.hpp b/include/vk-renderer.hpp index 6c6d2f0..ab15cd1 100644 --- a/include/vk-renderer.hpp +++ b/include/vk-renderer.hpp @@ -131,9 +131,11 @@ class RingBuffer { [[nodiscard]]size_t alloc(size_t alloc_size) { assert(alloc_size > 0 && alloc_size <= buffer_size); - if (ptr <= buffer_size - alloc_size) { + auto alloc_offset = ptr; + + if (alloc_offset <= buffer_size - alloc_size) { ptr += alloc_size; - return ptr; + return alloc_offset; } return invalid_alloc; |
