This file contains hidden or 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 "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup(){ | |
ofEnableNormalizedTexCoords(); | |
ofDisableArbTex(); | |
ofSetFrameRate(60); | |
ofBackground(22,33,44); | |
// Shader + VAO/VBO |
This file contains hidden or 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 <GLUT/GLUT.h> | |
int main(int argc, char **argv) | |
{ | |
glutInit(&argc, argv); | |
glutInitDisplayMode(GLUT_DEPTH | GLUT_SINGLE | GLUT_RGBA); | |
glutInitWindowPosition(100,100); | |
glutInitWindowSize(320,320); | |
glutCreateWindow("3D Tech- GLUT Tutorial"); | |
return 0; |
This file contains hidden or 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
/* | |
Original: 1562391 by branan | |
Updated to use GLFW so it works on Mac OS X Lion | |
*/ | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define GLFW_NO_GLU | |
#define GLFW_INCLUDE_GL3 |
This file contains hidden or 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 <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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 <cmath> | |
#include <assert.h> | |
#include <core/TestPattern.h> | |
TestPattern::TestPattern() | |
:w(0) | |
,h(0) | |
,frame_num(0) | |
,duration(0) |
This file contains hidden or 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
#!/bin/bash | |
set -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
# | |
# retrieved from: http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/ | |
# |
This file contains hidden or 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 <GL/glew.h> | |
#include <GL/glut.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
void init(); | |
void display(); |
This file contains hidden or 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 <stdlib.h> | |
#include <stdio.h> | |
#include <GL/glew.h> | |
#include <GL/glfw.h> | |
static void pushModelview() | |
{ | |
GLenum prev_matrix_mode; | |
glGetIntegerv(GL_MATRIX_MODE, &prev_matrix_mode); | |
glMatrixMode(GL_MODELVIEW); |
This file contains hidden or 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
/* EDIT: With OpenGL 4.3 and its compute shaders there is now a more direct way for such | |
rather non-rasterization pure GPGPU tasks like image processing. | |
You can just invoke a compute shader (which is more similar to other GPU computing frameworks, like CUDA or OpenCL, than the other OpenGL shaders) on a regular 2D domain and process a texture (using OpenGL 4.2's image load/store functionality) directly in-place. In this case all you need is the corresponding compute shader: | |
*/ | |
#version 430 | |
layout(local_size_x=32,local_size_y=8) in; //or whatever fits hardware and shader | |
layout(binding = 0, rgba) uniform image2D img; //adjust format to the actual data |
OlderNewer