From d2dc93d3be7c8f36889b0d3f11dc94b6a1fcdac9 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Sun, 4 Jun 2023 08:28:49 -0700 Subject: [PATCH] Half way through debugging texture problems --- src/dawnopengl/display/Texture.cpp | 5 +++++ src/dawnopengl/display/Texture.hpp | 1 + src/dawnshared/util/memory.hpp | 1 + 3 files changed, 7 insertions(+) diff --git a/src/dawnopengl/display/Texture.cpp b/src/dawnopengl/display/Texture.cpp index 6df79f3b..eed2788e 100644 --- a/src/dawnopengl/display/Texture.cpp +++ b/src/dawnopengl/display/Texture.cpp @@ -188,6 +188,11 @@ void Texture::buffer(struct ColorU8 pixels[]) { this->bufferRaw((void*)pixels); } +void Texture::buffer(struct Color pixels[]) { + this->bufferRaw((void*)pixels); + // assertUnreachable(); +} + void Texture::buffer(uint8_t pixels[]) { this->bufferRaw((void*)pixels); } diff --git a/src/dawnopengl/display/Texture.hpp b/src/dawnopengl/display/Texture.hpp index b64b5a10..ff898e84 100644 --- a/src/dawnopengl/display/Texture.hpp +++ b/src/dawnopengl/display/Texture.hpp @@ -33,6 +33,7 @@ namespace Dawn { void fill(uint8_t) override; bool_t isReady() override; void buffer(struct ColorU8 pixels[]) override; + void buffer(struct Color pixels[]); void buffer(uint8_t pixels[]) override; /** diff --git a/src/dawnshared/util/memory.hpp b/src/dawnshared/util/memory.hpp index 2c25c249..66656556 100644 --- a/src/dawnshared/util/memory.hpp +++ b/src/dawnshared/util/memory.hpp @@ -36,6 +36,7 @@ static inline void * memoryFillWithZero(const size_t size) { * @param pointer Pointer in memory to free. */ static inline void memoryFree(void *pointer) { + assertNotNull(pointer); free(pointer); }