Search found 27 matches

by Froyok
Tue Jan 17, 2023 3:21 am
Forum: Support and Development
Topic: Puzzled by a potential memory leak
Replies: 13
Views: 4391

Re: Puzzled by a potential memory leak

Alright so after reading a bit more about LUA garbage collector ( here and here ), I got confirmation that by default the GC runs when the memory double, which explains the behavior I saw. I ended up going with Batteries manual_gc.lua code to solve my problem: https://github.com/1bardesign/batteries...
by Froyok
Mon Jan 16, 2023 10:29 pm
Forum: Support and Development
Topic: Puzzled by a potential memory leak
Replies: 13
Views: 4391

Re: Puzzled by a potential memory leak

Okay so after playing a bit with more stuff, I think I have a better understanding of what is happening: The more memory I consume, the higher lua garbage collection threshold seems to be. ImGui generate garbage each frame, likely related to its drawing. On a small initial memory footprint imgui mem...
by Froyok
Mon Jan 16, 2023 10:10 pm
Forum: Support and Development
Topic: Puzzled by a potential memory leak
Replies: 13
Views: 4391

Puzzled by a potential memory leak

Hi folks ! I'm puzzled by the behavior of Love, or more precisely lua, on my current game. I have noticed a memory leak in my project, which can be fixed my running the garbage collector manually. To describe the issue: when I load meshes for my custom 3D project, then run Dear ImGui (via cimgui ) t...
by Froyok
Thu Jan 12, 2023 1:26 am
Forum: Libraries and Tools
Topic: OpenGL events in Love for RenderDoc
Replies: 8
Views: 7421

Re: OpenGL events in Love for RenderDoc

Time has passed, and with the help of Sasha I refined my original code (which wasn't working on Windows and was bothering me). The new snippet below now works on both Linux and Windows. (No idea about Mac since I cannot test it myself.) The main difference is that I now wrapped a bit better the code...
by Froyok
Sun Jul 31, 2022 8:24 am
Forum: Support and Development
Topic: libGL error on Manjaro
Replies: 2
Views: 1845

Re: libGL error on Manjaro

Latest version of Love is 11.4, so its looks like the package you got is a bit old. Have you tried the AppImage instead ? You can download it here: https://github.com/love2d/love/releases/tag/11.4 Also, it might help it you could paste here the output of glxinfo so that we know a bit better about yo...
by Froyok
Wed Jun 15, 2022 6:24 pm
Forum: Support and Development
Topic: Puzzled about alpha blending in Canvas
Replies: 5
Views: 1974

Re: Puzzled about alpha blending in Canvas

There is no problem on Love side, it's an issue in Tiled (which I thought was right initially). :) My shadow are too dark because of the sRGB blending (so I opened a github issue for them). Here is a more simple example of the issue: Y0615_143036.png This image shows three states: - Bottom half is m...
by Froyok
Wed Jun 15, 2022 9:30 am
Forum: Support and Development
Topic: Puzzled about alpha blending in Canvas
Replies: 5
Views: 1974

Re: Puzzled about alpha blending in Canvas

So it's not just a pure content problem. I have looked a bit more into it, I think it's a combination of several issues. On my side, I was also doing pre-multiplied alpha in my original image, so I fixed that. Tiled is also blending images in sRGB space, while I use instead Linear sRGB. So you don't...
by Froyok
Tue Jun 14, 2022 11:00 pm
Forum: Support and Development
Topic: Puzzled about alpha blending in Canvas
Replies: 5
Views: 1974

Re: Puzzled about alpha blending in Canvas

Ha well, I'm an idiot.

Issue is not on rendering side but on content side.
Tiled uses my PNG source image while in-game I use the DDS version, which wasn't in sync. :death:
by Froyok
Tue Jun 14, 2022 9:57 pm
Forum: Support and Development
Topic: Puzzled about alpha blending in Canvas
Replies: 5
Views: 1974

Puzzled about alpha blending in Canvas

I'm using Tiled to build my maps. I have layers, each with their own tiles from my tileset and I transcribe that into meshes that I draw later in my game (so each layer is a unique mesh). The list order from Tiled is then my draw order in Love. Now my issue is that I have a layer which contains tile...
by Froyok
Mon Jan 31, 2022 12:41 pm
Forum: Libraries and Tools
Topic: OpenGL events in Love for RenderDoc
Replies: 8
Views: 7421

Re: OpenGL events in Love for RenderDoc

Little update: I noticed that Love sometimes doesn't immediately sends the draw command. So calling PopEvent() might lead to incorrect results in RenderDoc because the actual draw in the code happens after the end of the event. This can be solved by calling love.graphics.flushBatch() before the PopE...