Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: DRM/KMS support  (Read 1074 times)

0 Members and 1 Guest are viewing this topic.

oomek

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • Email
DRM/KMS support
« on: April 10, 2020, 02:55:35 am »
I'm curious what is your stance on adding an implementation of DRM/KMS subsystem on Linux.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32432
    • View Profile
    • SFML's website
    • Email
Re: DRM/KMS support
« Reply #1 on: April 10, 2020, 10:23:56 am »
When you ask for a feature, please at least explain what it is, and how it would benefit to SFML. I have no idea about what DRM/KMS is, and even after a quick search, I have no idea why we would support it in SFML.
Laurent Gomila - SFML developer

oomek

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • Email
Re: DRM/KMS support
« Reply #2 on: April 10, 2020, 08:43:45 pm »
DRM serves the same function a X11 to open a window and reserve a surface, but with better latency and performance as it's closer to the metal.

oomek

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • Email
Re: DRM/KMS support
« Reply #3 on: June 01, 2020, 09:06:41 pm »
Mickelson added DRM/KMS support for Linux and Raspbian(RPI4) to his fork sfml-pi yesterday. Would you be interested merging it now with the master? sfml-pi is still 2.4.2

https://github.com/mickelson/sfml-pi/commit/4b7d415e1464fa98689130b4f7531d9b986c1430
« Last Edit: June 01, 2020, 09:16:12 pm by oomek »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 9573
    • View Profile
    • development blog
    • Email
Re: DRM/KMS support
« Reply #4 on: June 02, 2020, 10:46:29 am »
Nice! I think if you or Mickelson want to rebase/cherry-pick the change onto SFML master, this would certainly be considered. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

oomek

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • Email
Re: DRM/KMS support
« Reply #5 on: June 05, 2020, 04:19:23 pm »
A little heads up.

The DRM backend is almost finished. But we stumbled across an issue that we can't find an elegant way aroud. There was a problem with rendering locking up after pressing the Enter key. We discovered that it was due to the keyboard input being passed to the terminal underneath. We solved that by grabbing an exclusive rights to all keyboard events in /dev/input by calling `ioctl(*itr, EVIOCGRAB, 1);` unfortunately this left us unavle to generate a TextEvent. Can you think of any way of converting a keycode to utf32 without relying on tables for each codepage like in SDL?