Skip to content

xor-bits/srs2dge

Repository files navigation

Simple Rust 2D Game Engine

dependency status build status crates.io docs.rs

Live demo at: https://gpu.ovpk.net

Demo images

examples/tetris

examples/platformer

examples/main

Runtime env var configs:

PRESENT_MODE

  • mailbox/mail/sync/mb/m/s for immediate without tearing
  • fifo/f for no tearing (fallback)
  • immediate/nosync/im/i for immediate

WGPU_BACKEND (one or more comma separated)

  • vulkan/vk to allow Vulkan
  • dx12/d3d12 to allow DirectX 12
  • dx11/d3d11 to allow DirectX 11
  • metal/mtl to allow Metal
  • opengl/gles/gl to allow OpenGL
  • webgpu to allow WebGPU

WGPU_POWER_PREF

  • low to pick 'high efficiency low power GPU'
  • high to pick 'low efficiency high power GPU'
Examples:
  • PRESENT_MODE=mailbox to use 'vertical sync'
  • WGPU_BACKEND=vulkan,opengl to allow vulkan and/or opengl to be used
  • WGPU_POWER_PREF=low to prefer low power video cards