Skip to content

Instantly share code, notes, and snippets.

#define _USE_MATH_DEFINES
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include "glad/glad.h"
#include "GLFW/glfw3.h"
#define LIGHTMAPPER_IMPLEMENTATION
#define LM_DEBUG_INTERPOLATION
@mrdooz
mrdooz / gist:c12d2e6983ed3255cb20ad1747f5a8f8
Created August 16, 2020 15:58
Minimal assimp cmake configuration
I want to build a version of assimp that just has GLTF import support, but the generated solution files aren't completely untangled,
so the smallest I can get is:
SET(ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT FALSE)
SET(ASSIMP_BUILD_GLTF_IMPORTER TRUE)
SET(ASSIMP_BUILD_M3D_IMPORTER TRUE)
SET(ASSIMP_BUILD_M3D_EXPORTER TRUE)
SET(ASSIMP_BUILD_ASSBIN_EXPORTER TRUE)
SET(ASSIMP_BUILD_ASSXML_EXPORTER TRUE)
@ishad0w
ishad0w / sources.list
Created April 30, 2020 16:55
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
@ousttrue
ousttrue / CMakeLists.txt
Created June 3, 2019 13:39
emscripten glfw3 or webgl sample
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
PROJECT(em_gl VERSION 0.1.0)
LINK_DIRECTORIES(
$ENV{VCPKG_ROOT}/installed/x64-windows/lib
)
FILE(GLOB SRC
*.cpp
*.h
@Cartexius
Cartexius / install_gtest_ubuntu.md
Last active March 29, 2024 10:11
Install gtest in Ubuntu
@hostilefork
hostilefork / listener.c
Last active April 16, 2024 15:32
Simple listener and sender for UDP multicast
//
// Simple listener.c program for UDP multicast
//
// Adapted from:
// http://ntrg.cs.tcd.ie/undergrad/4ba2/multicast/antony/example.html
//
// Changes:
// * Compiles for Windows as well as Linux
// * Takes the port and group on the command line
//
@cartr
cartr / gist:7851463
Created December 7, 2013 23:48
Pygame Boilerplate
import pygame
pygame.init() #Start Pygame
screen = pygame.display.set_mode((640,480)) #Start the screen
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT: #The user closed the window!
running = False #Stop running
@MatthewJA
MatthewJA / pygame-beginner-template-light.py
Last active March 12, 2024 16:08
PyGame templates for beginners and for very, very beginners. PyGame template/tutorial script for beginners to PyGame (but not to Python).
import sys
import pygame
from pygame.locals import *
pygame.init()
fps = 60
fpsClock = pygame.time.Clock()
@waynegraham
waynegraham / console.js
Last active October 16, 2022 19:03
print console.log output to a debug div (for mobile)
if (typeof console != "undefined")
if (typeof console.log != 'undefined')
console.olog = console.log;
else
console.olog = function() {};
console.log = function(message) {
console.olog(message);
$('#debugDiv').append('<p>' + message + '</p>');
};
@whosaysni
whosaysni / gist:5733660
Created June 8, 2013 02:17
Hello world with Xlib.
/*
hellox -- Hello world with Xlib.
$(CC) -o hellox hellox.c -lX11 -L/usr/X11/lib
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>