Kha icon indicating copy to clipboard operation
Kha copied to clipboard

`setTexture` inconsisent across graphics backends

Open zzox opened this issue 1 year ago • 1 comments

Describe the bug g4.setTexture gives different results between opengl and d3d11. This happens when using g4 to set a texture but using g2 to draw the image

To Reproduce Run the example https://github.com/zzox/g4-set-texture with node ../Kha/make.js --run

Expected behavior The image appears on the masked area (running with -g opengl)

Image

Actual behavior Entire image is black because the mask doesn't get set

Image

Execution Environment:

  • Host system (where you compile your code): Windows 10
  • Target system (where you run your code): Windows 10
  • IDE used (if any): vscode
  • Kha revision:
  • Kha build output (Using Kha...): 3ec0976f
  • Application output (if it runs):

zzox avatar Aug 08 '25 17:08 zzox

PS: The default is d3d12, it was already working fine in d3d11.

RobDangerous avatar Aug 11 '25 14:08 RobDangerous