| ↓ on → | CPU | OpenGL | OpenGLES | D3D9 | D3D11 | D3D12 | Vulkan | Metal |
|---|---|---|---|---|---|---|---|---|
| OpenGL | [llvmpipe][] | - | [gl4es][] | [TitaniumGL][] | [d3d12][] | [zink][] | ||
| OpenGLES | [llvmpipe][] [SwiftShader][slegacy] | [ANGLE][] | - | [ANGLE][] | [ANGLE][] | [d3d12][] [ANGLE][] | [zink][] [ANGLE][] | [ANGLE][] [MoltenGL][] |
| D3D9 | [SwiftShader][slegacy] | [wined3d][] | - | [D3D9on12][] | [DXVK][] | |||
| D3D11 | [WARP][] | [wined3d][] |
| namespace detail { | |
| constexpr uint64_t sHashLo1 = 0x124b34c732f4a485ull; | |
| constexpr uint64_t sHashLo2 = 0x6fafc7de1f728990ull; | |
| constexpr uint64_t sHashLo3 = 0x9299b5768ee5e36dull; | |
| constexpr uint64_t sHashHi1 = 0x4d8271fe7646891full; | |
| constexpr uint64_t sHashHi2 = 0x6d48b8a30939437cull; | |
| constexpr uint64_t sHashHi3 = 0x122f44ec3b08f41cull; | |
| } | |
| uint64_t hash_word(uint64_t hash, uint64_t w) |
| #include <immintrin.h> | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <assert.h> | |
| typedef uint32_t uint32; | |
| typedef __m128i Vec128_U32; | |
| // "Insert" two 0 bits after each of the 11 low bits of x | |
| static uint32 Part1By2(uint32 x) |
| fn_decl void | |
| r_init(R_Init_Params *params) | |
| { | |
| // Allocate memory | |
| r_vk_state.permanent_arena = arena_alloc(); | |
| r_vk_state.frame_arena = arena_alloc(); | |
| r_vk_state.buffer_pool = pool_alloc(r_vk_state.permanent_arena, R_VK_Buffer, R_MAX_BUFFERS); | |
| r_vk_state.texture_pool = pool_alloc(r_vk_state.permanent_arena, R_VK_Texture, R_MAX_TEXTURES); | |
| r_vk_state.sampler_pool = pool_alloc(r_vk_state.permanent_arena, R_VK_Sampler, R_MAX_SAMPLERS); |
| @implementation AppDelegate | |
| - (instancetype)init { | |
| self = [super init]; | |
| NSString *displayName = [NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleDisplayName"]; | |
| NSMenu *mainMenu = [[NSMenu alloc] initWithTitle:@"Main Menu"]; | |
| { |
Lately I've been working on rInstallFriendly v2.0, my simple and easy-to-use tool to create fancy software installers.
rInstallFriendly v2.0, some of its multiple visual styles available. Style is fully customizable!
Ultra-compact sprite rendering code with example frame animation logic. This release contains tech bits from the upcoming SuperNeo™ 2D game engine and includes anchor/pivot point, rotation, color filtering, alpha blending and built-in antialiased point sampling. As usual: complete, runnable single-function app. ~150 LOC. No modern C++, OOP or (other) obscuring cruft.
Sprites are rendered back-to-front (AKA "painter's algorithm") in the order they are submitted, as one draw call. The provided setup employs a single texture atlas containing all the sprite graphics.
The renderer is "im
Example of how to capture CPU counters with ETW on Windows, perf on Linux or kperf on Apple.
Using ETW needs somewhat recently updated Windows 10 or 11. Not sure about exact version.
Currently tested on:
- etw on Qualcomm Snapdragon X Elite, Windows 11, arm64
- etw on AMD Zen 3, Windows 11 (with virtualization enabled in BIOS)
| // example of using Windows Preview Handler | |
| // https://learn.microsoft.com/en-us/windows/win32/shell/preview-handlers | |
| #define COBJMACROS | |
| #define WIN32_LEAN_AND_MEAN | |
| #include <windows.h> | |
| #include <shlwapi.h> | |
| #include <shellapi.h> | |
| #include <shobjidl.h> |
| /* | |
| MIT License | |
| Copyright (c) 2023 Jiayin Cao | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |

