- Compositors: Combine and render multiple graphical elements into a final display output. In X11, use the Composite extension to work with the X server, managing window transparency, effects, and desktop composition (ex: Compiz, KWin, Mutter). In Wayland, the compositor is the display server itself (ex: Weston, Sway, GNOME mutter-wayland). Compositors interact with the graphics stack through DRM/KMS for direct hardware access and use EGL or similar APIs for GPU-accelerated rendering.
- DRM (Direct Rendering Manager): A subsystem of the Linux kernel that provides an interface to graphics hardware. It manages GPU memory, handles synchronization, and enables direct rendering, which allows applications to send commands directly to the graphics hardware for better performance.
- EGL (Embedded Graphics Library): An interface between rendering APIs (such as OpenGL, OpenGL ES, or Vulkan) and the underlying native platform windowing system. Used for context management and surf
// ============================================================================= | |
// XNU kperf/kpc demo | |
// Available for 64-bit Intel/Apple Silicon, macOS/iOS, with root privileges | |
// | |
// | |
// Demo 1 (profile a function in current thread): | |
// 1. Open directory '/usr/share/kpep/', find your CPU PMC database. | |
// M1 (Pro/Max/Ultra): /usr/share/kpep/a14.plist | |
// M2 (Pro/Max): /usr/share/kpep/a15.plist | |
// M3: /usr/share/kpep/as1.plist |
WARNING: Article moved to separate repo to allow users contributions: https://github.com/raysan5/custom_game_engines
A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.
Nowadays lots of companies choose engines like [Unreal](https:
#!/usr/bin/env python3 | |
# @python3 | |
# @author Kalman Olah <[email protected]> | |
"""A hastebin CLI tool.""" | |
import click | |
import json | |
import requests | |
import subprocess | |
import sys |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
from collections import namedtuple | |
def convert(dictionary): | |
return namedtuple('GenericDict', dictionary.keys())(**dictionary) | |
""" | |
>>> d = dictionary(a=1, b='b', c=[3]) | |
>>> named = convert(d) | |
>>> named.a == d.a | |
True | |
>>> named.b == d.b |