Skip to content

Instantly share code, notes, and snippets.

View TomMinor's full-sized avatar

Tom Minor TomMinor

View GitHub Profile
#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 },
// 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
{
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
// 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;
#include <iostream>
#include <cstdlib>
class Vec3
{
public:
// constructor
Vec3(float _x, float _y, float _z)
{
m_x = _x;
#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
{
#!/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
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")
static const char* fullNameLookup[] =
{
"TWO",
"THREE",
"FOUR",
"FIVE",
"SIX",
"SEVEN",
"EIGHT",
"NINE",
enum PacketTypes
{
CARD = 0x00,
BET = 0x01,
BET_MAX = 0x02,
BET_MIN = 0x03,
MONEY = 0x04,
NAME = 0x05,
UNUSED0 = 0x06,
UNUSED1 = 0x07