Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<div id="root"></div>
<script>
/*
1. Create a WebGL context and add it to the root.
2. Draw a triangle in the WebGL context.
*/
const canvas = document.createElement('canvas');
const root = document.getElementById('root');
/*
1. Initialize the D3D12 environment directly with the windows api without helper functions.
2. Render a triangle.
*/
int
main(void)
{
// Initialize the window.
HWND hwnd = init_window(800, 600, "D3D12 Window");
@MarkMendell
MarkMendell / grapheme.c
Last active February 17, 2024 06:19
Code for extended grapheme cluster breaks
// Public domain
#include <stddef.h>
#include <stdint.h>
#if 0
// Example program
int
getlenextendedgrapheme(size_t nbuf, uint8_t *buf, size_t i)
{