Skip to content

Instantly share code, notes, and snippets.

@pervognsen
pervognsen / SDL_stb.h
Last active August 29, 2015 14:07
SDL_stb
#ifndef _SDL_stb_h
#define _SDL_stb_h
// Memory buffers
typedef struct
{
Uint8 *data;
Uint32 size;
} SDL_MemoryBuffer;
@binarycrusader
binarycrusader / textured_tri.py
Last active May 26, 2023 05:33
pysdl2 pyopengl "modern" opengl textured triangle example
#!/usr/bin/python2.7
"""Quick hack of 'modern' OpenGL example using pysdl2 and pyopengl
that shows a textured triangle; assumes there is a 'hazard.png' image
file in working directory.
Based on:
pysdl2 OpenGL example
http://www.tomdalling.com/blog/modern-opengl/02-textures/
http://www.arcsynthesis.org/gltut/Basics/Tut02%20Vertex%20Attributes.html