martinlindhe / dustbox-rs

DOS emulator (semi-abandoned)
https://martinlindhe.github.io/dustbox-rs/
MIT License
48 stars 7 forks source link

gtk: video render is antialiased #31

Open martinlindhe opened 6 years ago

martinlindhe commented 6 years ago

I tried and failed to find a way to disable antialiasing with gtk-rs.

It appears the issue is a feature of cairo, as explained at https://www.cairographics.org/FAQ/#sharp_lines

dustbox showing smeared graphics from running utils/palette/palette.com:

dustbox-pal

dosbox shows a clear image for the same program:

dosbox-pal

The issue is hard to see in Firefox too because also firefox antialiases the images. Save and use an external viewer such as Gimp to see the issue better.

nicklaswj commented 6 years ago

Since we just draw simple pixels from memory, maybe we could use something more simple than cairo...

martinlindhe commented 6 years ago

I totally agree. Cairo came as a consequence of using gtk-rs. I'd prefer to switch gui framework at this time

nicklaswj commented 6 years ago

maybe we should use opengl/esgl to render the screen, and thus make the video rendering GUI agnostic.

cjschneider2 commented 6 years ago

Is this the only reason you are considering moving away from GTK? Edit: If you just want to drop Cairo you can use a GDK pixbuf directly and render that into a GTK widget

nicklaswj commented 6 years ago

It's not the only reason, we also have some inconsistency problems between Linux (me) and OSX (martinlindhe)...

nicklaswj commented 6 years ago

also it would be nice to use a framework that feels more native than GTK, such as QT

cjschneider2 commented 6 years ago

Would you prefer the GUI in C++ with bindings to rust objects ala rust-qt-binding-generator or something more along the lines of one of the QML bindings? (with as much as possible in Rust)

nicklaswj commented 6 years ago

I personally prefer QML bindings such as https://github.com/White-Oak/qml-rust rust-qt-binding-generator seems too messy, and we don't require anything fancy, i.e. we only need a list for disassembled code, some buttons and text labels.

@martinlindhe right?

martinlindhe commented 6 years ago

Yea, I agree. We'd want as much code as possible in rust.