Skip to content

Instantly share code, notes, and snippets.


holland schutte holland01

View GitHub Profile
View d3dcompile.cpp
#include <Windows.h>
#include <d3d11.h>
#include <D3DCompiler.h>
bool GetCompiledShaderCode(ID3DBlob **pBlob, const char *pszShaderStr, const char *pszShaderTarget)
ID3DBlob *pErrorMsgs = NULL;
if (!SUCCEEDED(D3DCompile(
holland01 / float_unpack.c
Last active Jan 24, 2018
just some quick routines hobbled together for a computer architecture class (NOTE: this isn't for an assignment, it's used as a separate tool to aid analysis)
View float_unpack.c
#include <stdio.h>
#include <math.h>
#include <stdint.h>
#include <stdbool.h>
enum float_length {
holland01 / socket_boiler_class.h
Created Sep 16, 2017
Modified copypasta thrown into a class that might have a usecase for later...
View socket_boiler_class.h
// Shamelessly stolen from
// Need to link with Ws2_32.lib, Mswsock.lib, and Advapi32.lib
#pragma comment (lib, "Ws2_32.lib")
#pragma comment (lib, "Mswsock.lib")
#pragma comment (lib, "AdvApi32.lib")
template <size_t recvbuflen>
holland01 / graycode.c
Last active Apr 23, 2017
generates a graycode (recently edited to be simpler, faster, stronger...)
View graycode.c
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
void print_bin(int iteration, int value)
char buffer[36];
memset(buffer, 0, sizeof(buffer));
holland01 / pseudo.cpp
Created Sep 24, 2015
Quick face-point projection algorithm incorporating SAT concepts for OBB intersection tests. It's pretty primitive, and not full-proof, but it worked well for a time...
View pseudo.cpp
glm::vec3 fetch_point( const point_project_pair& ppp )
return ppp.mProjected;
// Returns true if a intersects b
bool pointset_intersects( cardinal_plane_normal_t planeType,
contact::list_t& contacts,
const obb& a,
const obb& b,