Skip to content

Instantly share code, notes, and snippets.

@briend
briend / Makefile
Created April 14, 2020 03:10 — forked from wakita/Makefile
Metal compute shader example
SDK = xcrun -sdk macosx
all: compute.metallib compute
compute.metallib: Compute.metal
# Metal intermediate representation (.air)
$(SDK) metal -c -Wall -Wextra -std=osx-metal2.0 -o /tmp/Compute.air $^
# Metal library (.metallib)
$(SDK) metallib -o $@ /tmp/Compute.air
@briend
briend / cairo_pyglet.py
Created March 8, 2018 22:22 — forked from stuaxo/cairo_pyglet.py
Render cairo on pyglet... modified from http://ethanmiller.name/
# Draw cairo in a pyglet window - without an intermediate image file.
import ctypes
#import cairocffi as cairo # example will work with cairocffi instead too
import cairo
import time
from pyglet import app, clock, font, gl, image, window
WIDTH, HEIGHT = 400, 400