This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Unspoiler Avatar | |
// @namespace unspoiler_avatar.pipsqueaker | |
// @include http://www.reddit.com/r/TheLastAirbender/ | |
// @include http://www.reddit.com/r/TheLastAirbender/* | |
// @include https://www.reddit.com/r/TheLastAirbender/ | |
// @include https://www.reddit.com/r/TheLastAirbender/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HAI 1.2 | |
BTW This program can multiply or divide two inputs | |
OBTW Execute this at | |
http://repl.it/0VH/6 | |
TLDR | |
I HAS A NUM | |
I HAS A BUM | |
I HAS A DEEZIRE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define GLEW_STATIC | |
#include <GL/glew.h> | |
#include "SDL2/SDL.h" | |
#include "SDL2/SDL_opengl.h" | |
#include "iostream" | |
const GLchar* vertexSource = | |
"#version 150 core\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/tmp/ccgA5o4g.o: In function `__Pyx_PyObject_GetAttrStr': | |
common.c:(.text+0xb1): undefined reference to `PyObject_GetAttr' | |
/tmp/ccgA5o4g.o: In function `__pyx_pf_6common_sin': | |
common.c:(.text+0x291): undefined reference to `PyMethod_Type' | |
common.c:(.text+0x3e9): undefined reference to `PyTuple_New' | |
common.c:(.text+0x5a2): undefined reference to `PyMethod_Type' | |
common.c:(.text+0x736): undefined reference to `PyTuple_New' | |
/tmp/ccgA5o4g.o: In function `__pyx_pf_6common_2cos': | |
common.c:(.text+0xc9f): undefined reference to `PyMethod_Type' | |
common.c:(.text+0xdf7): undefined reference to `PyTuple_New' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef LEARNOPENGL_COMMON_H | |
#define LEARNOPENGL_COMMON_H | |
#define GLEW_STATIC | |
#include <GL/glew.h> | |
#include <SDL2/SDL_opengl.h> | |
#include "vector" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "common.h" | |
int main() { | |
std::vector<GLfloat> source = {1, 2, 3, 4, 5, 6, 5, 6, 1, 2, 7, 8}; | |
std::vector<GLfloat> * optimized_verts = new std::vector<GLfloat>(); | |
std::vector<GLint> ebo = {}; | |
common::GenOptimizedArrays<GLfloat, GLint>(2, &source, optimized_verts, &ebo); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace common { | |
template<typename V, typename E> | |
void GenOptimizedArrays(const int& vertex_size, const std::vector<V> & vertex_source, | |
std::vector<V> *vertex_out, std::vector<E> *ebo_out) { | |
bool vertex_is_unique = true; | |
vertex_out->insert(vertex_out->end(), vertex_source.data(), vertex_source.data() + 2); | |
ebo_out->push_back(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef TINY2D_SHADERS_H | |
#define TINY2D_SHADERS_H | |
#define GLEW_STATIC | |
#include <GL/glew.h> | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_opengl.h> | |
#include <stdexcept> | |
#include <fstream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Shaders.h" | |
t2d::Shader::Shader(const char * foo, GLenum type, int loadmode = LOAD_FROM_FILE) { | |
if (loadmode == LOAD_FROM_FILE) { | |
std::ifstream in(foo); | |
source = std::string((std::istreambuf_iterator<char>(in)), std::istreambuf_iterator<char>()); | |
glSource = (GLchar *) source.c_str(); | |
} else if (loadmode == LOAD_FROM_STRING) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define GLEW_STATIC | |
#include <GL/glew.h> | |
#include "SDL2/SDL.h" | |
#include "SDL2/SDL_opengl.h" | |
#include "shaders.h" | |
#include <iostream> | |
#include <typeinfo> |
OlderNewer