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 BUFFER_OFFSET(offset) ((GLvoid*) NULL + offset) | |
#define NumberOf(array) (sizeof(array)/sizeof(array[0])) | |
void main() | |
{ | |
// Temporary vertex data | |
GLfloat cubeVerts[][3] = { | |
{ -1.0, -1.0, -1.0 }, | |
{ -1.0, -1.0, 1.0 }, | |
{ -1.0, 1.0, -1.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
// The normal attribute passed in from the vertex shader | |
in vec3 fragmentNormal; | |
in vec3 fragmentPosition; | |
// The output attribute that will be written to the framebuffer | |
layout(location = 0) out vec4 fragColour; | |
// Defines all the light info | |
struct Lights | |
{ |
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
layout(location = 0) in vec3 inVert; | |
layout(location = 1) in vec3 inNormal; | |
layout(location = 2) in vec3 inUV; | |
// Model View Projection matrix | |
uniform mat4 MVP; | |
// Model View matrix | |
uniform mat4 MV; | |
// Normal matrix |
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
// The normal attribute passed in from the vertex shader | |
in vec3 fragmentNormal; | |
// The output attribute that will be written to the framebuffer | |
layout(location = 0) out vec4 fragColour; | |
// Defines all the light info | |
struct Lights | |
{ | |
vec4 position; |
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 <iostream> | |
#include <cstdlib> | |
class Vec3 | |
{ | |
public: | |
// constructor | |
Vec3(float _x, float _y, float _z) | |
{ | |
m_x = _x; |
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
#version 420 // Keeping you on the bleeding edge! | |
#extension GL_EXT_gpu_shader4 : enable | |
smooth in vec3 fragmentNormal; | |
// Force location to 0 to ensure its the first output | |
layout (location = 0) out vec4 o_FragColor; | |
struct Lights | |
{ |
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
#!/usr/bin/python2.6 | |
from PIL import Image, ImageDraw, ImageFont | |
from subprocess import call | |
import math | |
left_region = 1 | |
right_region = 2 | |
bottom_region = 4 | |
top_region = 8 |
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
import maya.cmds as cmds | |
selection = cmds.ls(sl=True) | |
if len(selection) > 0: | |
targetMesh = selection[-1] | |
affectedVertices = selection[0:-1] # Assume these are vtx (add some error checking) | |
affectedMesh = cmds.listRelatives(cmds.listRelatives(affectedVertices[0], p=True), p=True) | |
vtxSet = cmds.sets(affectedVertices, v=True, n="SelectionSet") |
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
static const char* fullNameLookup[] = | |
{ | |
"TWO", | |
"THREE", | |
"FOUR", | |
"FIVE", | |
"SIX", | |
"SEVEN", | |
"EIGHT", | |
"NINE", |
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
enum PacketTypes | |
{ | |
CARD = 0x00, | |
BET = 0x01, | |
BET_MAX = 0x02, | |
BET_MIN = 0x03, | |
MONEY = 0x04, | |
NAME = 0x05, | |
UNUSED0 = 0x06, | |
UNUSED1 = 0x07 |
NewerOlder