Skip to content

Instantly share code, notes, and snippets.

@Reedbeta
Reedbeta / interesting-libs.txt
Last active July 4, 2023 02:38
Interesting libraries I might like to use in a project
Interesting libraries I might like to use in a project...
Asset loading:
assetsys.h - virtual filesystem with ZIP backing, overlaying, etc https://github.com/mattiasgustavsson/libs/blob/master/docs/assetsys.md
cute_filewatch.h - file modification watching, for runtime reloading etc https://github.com/RandyGaul/cute_headers/blob/master/cute_filewatch.h
flatbuffers - data serialization, zero-copy deserialization, extensible schemas https://github.com/google/flatbuffers
stb_image - https://github.com/nothings/stb/blob/master/stb_image.h
tinyexr - https://github.com/syoyo/tinyexr
tinygltf - https://github.com/syoyo/tinygltf
tinyobjloader - https://github.com/syoyo/tinyobjloader
@Morwenn
Morwenn / fix-c-arrays.md
Last active July 20, 2019 13:48
State of C arrays in C++

State of C arrays in C++

Fixing C arrays in the language and making them the vocabulary type they should always have been.

TODO: more motivation

TODO: mention that fixing std::array is also a noble goal, but not one that this proposal pursues, that said it's also worth noting that fixes applied to C arrays might also apply to std::array

TODO: make it only about stack arrays, somewhat disregard dynamic ones

@PossiblyAShrub
PossiblyAShrub / dock_builder_example.cpp
Created August 12, 2020 15:13
Simple example, of how to use the dock builder API. (Adapted from the dock space example in the demo window) You need to use the docking branch and set the ImGuiConfigFlags_DockingEnable config flag. Learn more about Dear ImGui here: https://github.com/ocornut/imgui
static ImGuiDockNodeFlags dockspace_flags = ImGuiDockNodeFlags_PassthruCentralNode;
// We are using the ImGuiWindowFlags_NoDocking flag to make the parent window not dockable into,
// because it would be confusing to have two docking targets within each others.
ImGuiWindowFlags window_flags = ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoDocking;
ImGuiViewport* viewport = ImGui::GetMainViewport();
ImGui::SetNextWindowPos(viewport->Pos);
ImGui::SetNextWindowSize(viewport->Size);
ImGui::SetNextWindowViewport(viewport->ID);
@sulix
sulix / cdda.c
Created December 4, 2024 13:02
CDDA Playback via Digital-Audio-Extraction on Linux w/SDL3
// Super-hacky CD player with SDL3 and the CDROMREADAUDIO ioctl.
#include <linux/cdrom.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdint.h>
#include <sys/ioctl.h>