guillaumechereau / goxel

Goxel: Free and Open Source 3D Voxel Editor
GNU General Public License v3.0
2.74k stars 219 forks source link

Fix image plane to mesh conversion #245

Closed ravencgg closed 3 years ago

ravencgg commented 3 years ago

Fixes a crash in the memcpy on non-square images. Fixes the orientation and placement of the mesh.

guillaumechereau commented 3 years ago

Hello, what bug is this fixing exactly? I tried the patch and turning an image layer into a mesh now seems to revert the image.

guillaumechereau commented 3 years ago

Oh I see, there is indeed a memory bug. Your patch fixes it, but now the mesh is flipped somehow.

ravencgg commented 3 years ago

You're right, my test image was symmetrical on the x axis so I missed it. Fixed in latest commit.

guillaumechereau commented 3 years ago

Thanks!