Skip to content

Instantly share code, notes, and snippets.

View flibitijibibo's full-sized avatar

Ethan Lee flibitijibibo

View GitHub Profile
@flibitijibibo
flibitijibibo / mojoshader-vkd3d.md
Last active December 17, 2023 04:27
MojoShader HLSL support for vkd3d-shader
@flibitijibibo
flibitijibibo / glon12.md
Last active September 17, 2024 19:17
GLon12 Instructions
@flibitijibibo
flibitijibibo / MultiWindow.cs
Created February 8, 2022 17:38
FNA with Multiple Windows
/* FNA MultiWindow Example
* Written by Ethan "flibitijibibo" Lee
* https://www.flibitijibibo.com/
*
* Released under public domain.
* No warranty implied; use at your own risk.
*/
using System;
using SDL2;
/* gcc -g -o titlebar titlebar.c `sdl2-config --cflags --libs`
* SDL_VIDEODRIVER=wayland ./titlebar
*/
#include <SDL.h>
int main(int argc, char **argv)
{
SDL_Window *window;
SDL_Renderer *renderer;
@flibitijibibo
flibitijibibo / SDLDirectPInvoke.cs
Last active July 13, 2021 21:01
Barfs out all the SDL P/Invoke functions needed to dynamically link
using System;
using System.Reflection;
static class Program
{
static void Main(string[] args)
{
MethodInfo[] methods = typeof(SDL2.SDL).GetMethods(BindingFlags.Public | BindingFlags.Static);
foreach (MethodInfo m in methods)
{
@flibitijibibo
flibitijibibo / buildfnalibs.sh
Created May 20, 2021 19:31
Build script for FNA3D/FAudio
#!/bin/bash
run_builds() {
cd ~/libraries/$1
cd flibitBuild
make -j8
cd ../flibitBuildWin32
make -j8
cd ../flibitBuildWin64
make -j8
#!/bin/bash
set -ex
cd "`dirname "$0"`"
# Start with the Kick environment
curl -LO https://github.com/flibitijibibo/MonoKickstart/archive/master.zip
unzip -j master.zip MonoKickstart-master/precompiled/*
rm master.zip kick.bin.osx kick.bin.x86_64.debug System.Xml.Linq.dll
@flibitijibibo
flibitijibibo / avSpecFix.sh
Last active January 17, 2021 18:49
Run this to fix weird bitrot in Axiom Verge and also update to FNA3D and stuff
#!/bin/bash
# Axiom Verge FNA Update and Also Work Around A Bunch of Spec Violations Script
# Written by Ethan "flibitijibibo" Lee
#
# Put this in the Axiom Verge directory and run it. Not much to see here.
#
# FNA patch, if anyone wants it:
# https://gist.github.com/flibitijibibo/ffdd7c6fe32b9846a83807dab24be8fd
set -ex
diff --git a/src/Color.cs b/src/Color.cs
index 2499edc..817b67e 100644
--- a/src/Color.cs
+++ b/src/Color.cs
@@ -1392,6 +1392,24 @@ namespace Microsoft.Xna.Framework
private set;
}
+ public static Color CustomRed
+ {
@flibitijibibo
flibitijibibo / SpriteDepthTest.cs
Created September 24, 2020 01:41
Batching/Sorting accruacy test for SpriteBatch
/* SpriteBatch Stress Test
* Written by Ethan "flibitijibibo" Lee
* http://www.flibitijibibo.com/
*
* Released under public domain.
* No warranty implied; use at your own risk.
*/
using System;
using System.Diagnostics;