Kode / Krom

Other
96 stars 23 forks source link

Krom does not render more than one image at a time on Windows #141

Closed smallfx closed 3 years ago

smallfx commented 3 years ago

Hello! I am using the latest Kha and Krom on Windows 10. I have tried pre-built binaries from the Krom_bin repo and building my own locally with exactly the same results as described below.

If I call drawSubImage with two different Asset.image arguments for each call, Kha only ever renders the first one. The image asset files are .png format.

Here's some example code that I used to isolate the problem: https://gist.github.com/smallfx/f45c1ae2ba47748f78841c9a4920f084

This seems like a very obvious issue, so I'm hesitant to think that it's an actual bug with Kha or Krom. I'm using vscode with the kha extension pack and building for Krom via the green play button in the vscode debug menu.

Here is the result if I use two different images: Screenshot 2020-11-03 142817

Here is the result if I use two of the same image: Screenshot 2020-11-03 142848

Of note: if I call drawRect before the second image is drawn (location / size etc do not matter - it just needs to be called on the same context of course), it renders both of them perfectly fine.

RobDangerous commented 3 years ago

Fixed for Windows and Linux. macOS failed to compile for some reason.

smallfx commented 3 years ago

Tested and works! Will close this issue now, thanks for the speedy fix :)