slages / love-imgui

imgui module for the LÖVE game engine
MIT License
318 stars 61 forks source link

Support images with premultiplied alpha #7

Closed Alloyed closed 7 years ago

Alloyed commented 7 years ago

This is a crosspost of https://github.com/ocornut/imgui/issues/1035

TL;DR: I want to use imgui with premultiplied alpha images, and there's no way (that I can find) to tell love-imgui to do that. 2017-02-22-115635_394x230_scrot

slages commented 7 years ago

I made a change to automatically apply the premultiplied alpha blend mode when imgui.Image or imgui.ImageButton is used to draw a Canvas, it should fix your issue!

I didn't made a new release, so you'll need to build a new version from source.

Alloyed commented 7 years ago

Yep, it works! This is maybe less flexible than I imagined (I couldn't have a normal Image use premultiplied alpha for example) but I wasn't planning on doing that sort of thing anyways.