JeanPhilippeKernel / RendererEngine

3D Renderer Engine builds with Vulkan and C++ 20
MIT License
184 stars 18 forks source link

Fix Texture2D::Create(...) to generate correct internal image buffer size #296

Open JeanPhilippeKernel opened 9 months ago

JeanPhilippeKernel commented 9 months ago

Texture2D struct has public APIs that help the creation of monochrome texture.

The current implementation of those methods uses a fixed buffer (image_data) that doesn't scale along the input parameters: width, height.

The fix should take care of dynamically scale and fill the buffer to correctly create the requested texture2D object