Skip to content

Instantly share code, notes, and snippets.

@bagobor
bagobor / edtaa3func.h
Created March 7, 2018 06:59 — forked from Flix01/edtaa3func.h
A Signed Distance Font Builder for Dear ImGui
/*
* edtaa3()
*
* Sweep-and-update Euclidean distance transform of an
* image. Positive pixels are treated as object pixels,
* zero or negative pixels are treated as background.
* An attempt is made to treat antialiased edges correctly.
* The input image must have pixels in the range [0,1],
* and the antialiased image should be a box-filter
* sampling of the ideal, crisp edge.
@bagobor
bagobor / vsync.txt
Created December 2, 2015 05:36 — forked from dwilliamson/vsync.txt
Windows vsync
VSync under Windows, revisited
http://www.virtualdub.org/blog/pivot/entry.php?id=157
Windowed mode, vsync stutter, DWM (Vista+)
http://armageddongames.net/showthread.php?96793-Windowed-mode-vsync-stutter-DWM-(Vista-)
DwmFlush function
https://msdn.microsoft.com/en-us/library/windows/desktop/dd389405(v=vs.85).aspx
Bug 856427 - Add vsync support on windows
@bagobor
bagobor / gist:4e1e0c47f6f6f014b5d5
Created November 13, 2015 07:34 — forked from Madsy/gist:6980061
Working multi-threading two-context OpenGL example with GLFW 3.0.3 and GLEW 1.8
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <vector>
#include <cmath>
#include <cstdio>
#include <limits>
#include <chrono>
#include <thread>
#include <mutex>
2b19acb1ac85c20eb4d648619b7c5a9f9a6eef22
GoblinDefenders/Classes/Arena.cpp | 10 +-
GoblinDefenders/Classes/ArenaInfo.h | 1 +
GoblinDefenders/Classes/GameTypedef.h | 4 +-
GoblinDefenders/Classes/Helper.cpp | 9 +
GoblinDefenders/Classes/Helper.h | 3 +
GoblinDefenders/Classes/Item.cpp | 41 ++
GoblinDefenders/Classes/Item.h | 10 +
GoblinDefenders/Classes/JSONDataManager.cpp | 8 +
GoblinDefenders/Classes/Market.cpp | 30 +-
#!/bin/bash
echo Building Google Protobuf for Mac OS X / iOS.
echo Use 'tail -f build.log' to monitor progress.
(
PREFIX=`pwd`/protobuf
mkdir ${PREFIX}
mkdir ${PREFIX}/platform
@bagobor
bagobor / retro.py
Created January 17, 2014 08:03 — forked from benwebber/retro.py
#!/usr/bin/env python
"""
An 8-bit avatar generator.
"""
from __future__ import division
import argparse
import hashlib