Skip to content

Instantly share code, notes, and snippets.

@CallumDev
CallumDev / Obj2Header.cs
Created March 20, 2021 11:20
Program for creating a flattened vertex buffer from .obj and writing as a C header
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
namespace Obj2Header
{
#!/bin/bash
# discordencode - encodes a video file to under 8MiB for Discord
usage () {
echo "Usage: [USEAUDIO=1] [VPRESET=x264-preset] discordencode input output.mp4"
}
if [ -z "$1" ]
then
usage
exit 1
fi
@CallumDev
CallumDev / fontconfig.c
Created January 21, 2015 14:08
FontConfig sample in C
//compiled gcc fonttest.c -o fonttest -lfontconfig
//Sample output: /usr/share/fonts/steam-fonts/arial.ttf
#include <stdio.h>
#include <stdlib.h>
#include <fontconfig/fontconfig.h>
int main()
{
FcConfig* config = FcInitLoadConfigAndFonts();
//make pattern from font name
FcPattern* pat = FcNameParse((const FcChar8*)"Arial");