Skip to content

Instantly share code, notes, and snippets.

View PolarNick239's full-sized avatar

Nikolai Poliarnyi PolarNick239

View GitHub Profile
@donny-dont
donny-dont / aligned_allocator.cpp
Created December 13, 2011 09:11
An aligned allocator for placing SIMD types in std::vector
#ifdef _WIN32
#include <malloc.h>
#endif
#include <cstdint>
#include <vector>
#include <iostream>
/**
* Allocator for aligned data.
@jay3sh
jay3sh / minimum-opengles-code.html
Created August 26, 2011 13:46
Minimum length WebGL code to draw least meaningful output - A straight line
<html>
<head>
<title></title>
<script type="text/javascript">
var fragShaderSource = "\
precision highp float;\
uniform vec4 u_color;\
void main(void) {\
gl_FragColor = u_color;\
}\