Skip to content

Instantly share code, notes, and snippets.

@XProger
XProger / support_map.cpp
Created September 17, 2018 13:32
support mapping for basic primitives
void supportPoint(const Body &body, const vec3 &dir, vec3 &v) {
v = vec3::ZERO;
}
void supportSegment(const Body &body, const vec3 &dir, vec3 &v) {
v.x = v.z = 0.0f;
v.y = sign(dir.y) * body.height;
}
void supportRect(const Body &body, const vec3 &dir, vec3 &v) {
@XProger
XProger / pvr.h
Last active January 20, 2019 22:34
PVR file loader for OGL
#define PVR_RGBA8 0x61626772
#define PVR_PVRTC4 0x00000002
#define PVR_ETC1 0x00000006
#define PVR_BC1 0x00000007
#define PVR_ALPHA 0x00000061
#define GL_COMPRESSED_RGB_S3TC_DXT1 0x83F0
#define GL_ETC1_RGB8_OES 0x8D64
#define GL_COMPRESSED_RGB_PVRTC_4BPPV1 0x8C00
Commodore
- Amiga CD32 - Spellbound
- CDTV - Black Baby
Atari
- Home Pong - Darlene
- 2600 - Stella
- Lynx - Handy
- Jaguar 2 - Midsummer