NVidia sponsored talk – assume there is some tie-in, did NVidia help do the work?
Rich Kelters at Valve
Linux is an open platform, Linux for gaming is growing, stepping stone to mobile
Steam for linux
Feb Mac 3% Linux 2%, Windows 94%.
D3D stagnant at this point, OpenGL can do most of it. GL exposes functionality by hardware, not OS. GL can be extended quickly. GL 4.3 is a superset of functionality. GL might be running circles around D3D in a year or two.
Windows -> Linux. Use SDL. Used for all Valve ports, and Linux Steam.
Case sensitivity – use lower-case, or use file cache, or both.
Bad defines – assume LINUX meant DEDICATED_SERVER. Locale issues. Just set to en_US.utf8, however not everyone has that locale, so need to warn them.
Font – freetype and fontconfig. clock_gettime(CLOCK_MONOTONIC), raw mouse input but some window managers grab keyboard and alt-tab breaks. Multi-monitor not as polished.
Steam Linux Runtime (and SDK) – provides binary compatibility across many Linux distros, https://github.com/ValveSoftware/steam-runtime.
perf, vtune, Telemetry. Telemetry is from RAD Tools.
Direct3D -> OpenGL, most of the work of the port. DX version minus 7 is OpenGL version.
togl – is a D3d9/10/11 implementation using OpenGL.
GL has thread local data, context and thread are one-to-one; if you call GL from a thread that has no context, you get nothing. GL is chatty but efficient.
Consider GLEW to wrangle extensions.
EXT_direct_state_access – AMD and NVidia both support, Intel might. DSA is driver-only, and you can have your own implementation when it’s not available.
EXT_swap_interval is vsync.
EXT_swap_control_tear – do-no-harm vsync.
ARB_debug_output to get your logging code called by the driver on errors, works best on single-threaded mode.
Performance – MakeCurrent issue, it is very expensive (don’t even want to call it once a frame).
Modern OpenGL is multithreaded – you talk to a shim, and then calls actually get moved to a server thread, sometimes you need to sync shim and thread with a flush, this is expensive. E.g. glGetXX causes serialization, functions that return a value, functions that work on large amounts of data.
Don’t use MapBuffer, it causes serialization.
NVidia Nsight supports GL 4.2 Core, PerfStudio and gDEBugger, CodeXL, Apitrace.