PistonDevelopers / conrod

An easy-to-use, 2D GUI library written entirely in Rust.
Other
3.35k stars 298 forks source link

Unable to figure out alpha blending for Piston elements #1085

Open simon-whitehead opened 7 years ago

simon-whitehead commented 7 years ago

Hello again,

This might seem dumb, but I really can't figure out this issue. I'm having this font rendering issue with UI elements rendered via a Piston (OpenGL) backend:

screen shot 2017-10-22 at 1 37 13 am

I found similar issues that say "alpha blending isn't enabled in piston2d-graphics anymore by default - just enable it".

I'm really not sure how to enable it? I even tried directly calling gl::Enable(gl::BLEND); and that also didn't help.

Sorry but I'm struggling to find documentation about this 😞 Any help is greatly appreciated.

Thanks,

Simon

simon-whitehead commented 7 years ago

I've actually just dumped the draw state before rendering primitives and ... now I'm at a loss:

screen shot 2017-10-22 at 5 31 31 pm

Can anyone give me any advice on what the cause of this might be? "Enable alpha blending" doesn't seem to be the fix for me 😞

simon-whitehead commented 7 years ago

If it helps at all - the code for my project is here: https://github.com/simon-whitehead/chemboy/blob/debugger/src/gameboy/ui/ui.rs#L137. I'm essentially just copying and pasting Conrod examples now to try and get it to work. I'm so very very close ... I can feel it.