haxeui / haxeui-kha

The Kha backend of the HaxeUI framework -
http://haxeui.org
MIT License
45 stars 16 forks source link

Updating images with render targets results in no graphics displayed #62

Open XANOZOID opened 1 year ago

XANOZOID commented 1 year ago

This essentially effects button icons, images, anything like that. I have set up a test project where it initially creates a render target and sets the haxeui data to it. It appears to render. It sets the icon of a button to the image and it sets the resource of an image to the render target. However, if you press the button it basically repeats the exact same thing but any subsequent presses of the button will render the graphics as nothing.

Expected Behavior

Updating the icon/image-resource should not cause the graphics to null.

Current Behavior

Pressing the button after the initial load causes the graphics to become null.

Steps to Reproduce (for bugs)

Code included.

  1. Create a render target, set image resource to it
  2. Repeat this step in an event, like a button press

Context

This may be causing problems elsewhere with Kha as I'm seeing other graphical glitches in my main app that seem somewhat similar in concept but not directly related HaxeUI. But for HaxeUI we should expect to be able to change the graphics of images or icons without them clearing.

Your Environment

XANOZOID commented 1 year ago

Here's a test app testapp.zip

XANOZOID commented 1 year ago

I tried creating a simple Kha app that effectively tested for the same thing, it did not result in the same problem. This test app tests for resetting the render targets on any key input found. I tried this test with and without haxeui active - when haxeui was active it did not display the first rendered tile.

Without haxeui kha_simple.zip

With haxeui bug_with_haxeui.zip

Still not certain what causes this issue though. Seems very particular/specific. Does not seem to be related to overlapping begins/ends though.

XANOZOID commented 1 year ago

3 new pieces of intel: