SDL 2.0.22 inosvika neWayland kunatsurudzwa uye zvinhu zvitsva

SDL_Logo

The kuburitswa kweshanduro itsva yeSDL 2.0.22, vhezheni umo kuvandudzwa kwakasiyana-siyana neWayland kwakaitwa, pamwe nekuvandudzwa kwakasiyana uye nezvimwe.

Kune avo vasingazive raibhurari yeSDL, iwe unofanirwa kuziva kuti izvi, inopa zvishandiso senge Hardware inokasira 2D uye 3D giraidhi kuburitsa, yekugadzirisa yekuisa, yekuteerera kutamba, 3D kuburitsa kuburikidza OpenGL / OpenGL ES uye mamwe akawanda akafanana mabasa.

SDL yakafanana neDirectX, kune munhu anogona kupokana kuti analog yeDirectX ndeye OpenGL. DirectX inoshandawo nemidziyo yekupinza uye ruzha. Loki Software payakatanga kuburitsa mitambo yeAAA paLinux, vakatsiva Direct3D neOpenGL uye pakanga pasina chekutsiva chimwe chinhu uye nekuti zvakaoma kunyora "X" manyorerwo mazuva ano kunyangwe neWinAPI paAPI X11, asi neDirectDraw paWinAPI yatove. dambudziko, nderekuti SDL yakazvarwa sei.

Main nyowani maficha e SDL 2.0.22

Mune iyi vhezheni itsva inoratidzwa, the Wayland protocol kuenderana kuvandudzwa, saka pakutanga, yakanga yakarongwa kushandura kushandisa Wayland protocol nekukasirada munzvimbo dzinopa rutsigiro panguva imwe chete yeWayland neX11, asi nekuda kwematambudziko zvine chekuita neWayland mumitambo yeNVIDIA nevatyairi, zvakasarudzwa kumbomisa shanduko (Munzvimbo dzeWayland nechikamu cheXWayland, zvinobuda zvichiri kushandiswa uchishandisa X11 protocol.)

Kushandisa Wayland, shanduko yemamiriro ekunze inofanirwa kusetwa "SDL_VIDEODRIVER=wayland" usati watanga application, kana wedzera basa 'SDL_SetHint(SDL_HINT_VIDEODRIVER, "wayland,x11")' kune kodhi usati wafonera SDL_Init(). Kunyora neWayland kunoda angangoita libwayland-client 1.18.0.

Imwe shanduko inomira pachena ndeyekuti yakawedzera seti yemabasa ekugadzirisa nzvimbo dzine rectangular (sarudza kuitika kwemapoinzi, bvisa, enzanisa, batanidza, nezvimwewo), uchishanda nemarongedzero uye saizi zvichienderana nenhamba dzinoyangarara.

KuLinux, yakawedzera SDL_HINT_X11_WINDOW_TYPE mureza kuseta _NET_WM_WINDOW_TYPE parameter paWindows, uye wowedzera SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR mureza weLinux kushandisa libdecor ine composite maseva anotsigira xdg-kushongedza.

Ye Android, iyo SDL_AndroidSendMessage () basa rinoitwa kutumira murairo wepombi kune Java SDL controller.

Yeimwe shanduko izvo zvinomira pachena:

  • Yakawedzerwa SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE mureza kuti chiitiko cheSDL_QUIT chigoneswe kana hwindo rekupedzisira ravharwa.
  • Yakawedzera SDL_HINT_JOYSTICK_ROG_CHAKRAM maitiro ekubata ROG Chakram mbeva sechinhu chinofadza.
    Yakawedzera SDL_RenderGetWindow() basa rekuita kuti hwindo ribatanidzwe neSDL Renderer.
  • Yakawedzerwa SDL_IsTextInputShown() basa rekutarisa kana nzvimbo yekupinda mavara yaratidzwa.
  • Yakawedzera SDL_ClearComposition() basa rekudzima nzvimbo yekuisa mavara pasina kudzima nzira yekupinda (IME).
  • Tawedzera SDL_TEXTEDITING_EXT chiitiko kuti tikwanise kubata mavara marefu uye SDL_HINT_IME_SUPPORT_EXTENDED_TEXT mureza kuti chiitiko ichi chigoneke.
  • Yakawedzera SDL_HINT_MOUSE_RELATIVE_MODE_CENTER mureza kuitira kuti mbeva irambidzwe kusvika pakati pehwindo chete pachinzvimbo chehwindo rese kana modhi yehukama yabatidzwa.
  • Inogonesa otomatiki mbeva kubatwa paunenge uchidzvanya mabhatani embeva. SDL_HINT_MOUSE_AUTO_CAPTURE hunhu hunonzi hudzimwa.

Finalmente kana iwe uchifarira kuziva zvakawanda nezvazvo yeiyi vhezheni itsva, unogona kutarisa iyo ruzivo mune inotevera chinongedzo.

Maitiro ekuisa yakapusa DirectMedia Layer paLinux?

Kuisa raibhurari iyi paLinux kuri nyore sezvo kugoverwa kweLinux kuchinayo mukati mezvinhu zvavo

Kana iri Debian, Ubuntu uye kugoverwa kunobva pane izvi, iwe uchafanirwa kumhanya chete inotevera mirairo mune chinouraya:

sudo apt-get install libsdl2-2.0
sudo apt-get install libsdl2-dev

Panyaya yenyaya yeavo vari uArch Linux suarios isu tinongofanirwa kumhanya zvinotevera:

sudo pacman -S sdl2

Muchiitiko cheavo vari vashandisi ve Fedora, Centos, RHEL kana chero kugoverwa kunoenderana navo, ivo vanongofanirwa kumhanya unotevera kuraira:

sudo yum install SDL2
sudo yum install SDL2-devel

Kune mamwe ese maLinux kugoverwa, ivo vanogona kutsvaga iyo package "sdl" kana "libsdl" yekumisikidza kana kurodha pasi uye kuumbiridza sosi kodhi.

Vanoita izvi ne:

git clone https://hg.libsdl.org/SDL SDL
cd SDL
mkdir build
cd build
./configure
make
sudo make install

Izvo zviri muchinyorwa zvinoomerera pamisimboti yedu ye tsika dzekunyora. Kuti utaure chikanganiso tinya pano.

Iva wekutanga kutaura

Siya yako yekutaura

Your kero e havazobvumirwi ichibudiswa.

*

*

  1. Inotarisira data: AB Internet Networks 2008 SL
  2. Chinangwa cheiyo data: Kudzora SPAM, manejimendi manejimendi.
  3. Legitimation: Kubvuma kwako
  4. Kutaurirana kwedata
  5. Dhata yekuchengetedza: Dhatabhesi inobatwa neOccentus Networks (EU)
  6. Kodzero: Panguva ipi neipi iwe unogona kudzora, kupora uye kudzima ruzivo rwako