Skip to content

Instantly share code, notes, and snippets.

@andrew-pa
andrew-pa / vctr.htm
Last active September 26, 2015 10:43
Simple quad with movable points
<html>
<head>
<title>Vector Drawing</title>
<script>
var canvas, cnt;
var vdw = [];
var scl = 200, ofs = 200;
var moving_dot = -1;
var selected_dot = -1;
function mousepos(evt) {
@andrew-pa
andrew-pa / .gitattributes
Last active December 16, 2016 06:35
A silly and broken crossword generator
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
@andrew-pa
andrew-pa / crsl.cpp
Created September 12, 2017 02:49
Cairo, GL, SDL together
#include <iostream>
#include <cairo/cairo.h>
#include <cairo/cairo-gl.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_syswm.h>
int main(int argc, char* argv[]) {
SDL_Init(SDL_INIT_VIDEO);
auto win = SDL_CreateWindow("crsl", 300, 300, 512, 512, SDL_WINDOW_OPENGL);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);