Created
December 17, 2012 05:10
-
-
Save fishkingsin/4315891 to your computer and use it in GitHub Desktop.
matrix cube drawing with openframeworks
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 "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup(){} | |
//-------------------------------------------------------------- | |
void testApp::update(){} | |
//-------------------------------------------------------------- | |
void testApp::draw(){ | |
glPushMatrix(); | |
glTranslated(-8*15,-8*15,-8*15); | |
for(int i = 0 ; i < 512 ; i++) | |
{ | |
glPushMatrix(); | |
glTranslated((i%8)*30, ((i/8)%8)*30, (i/64)*30); | |
ofBox(20); | |
glPopMatrix(); | |
} | |
glPopMatrix(); | |
} | |
//-------------------------------------------------------------- | |
void testApp::keyPressed(int key){} | |
//-------------------------------------------------------------- | |
void testApp::keyReleased(int key){} | |
//-------------------------------------------------------------- | |
void testApp::mouseMoved(int x, int y ){} | |
//-------------------------------------------------------------- | |
void testApp::mouseDragged(int x, int y, int button){} | |
//-------------------------------------------------------------- | |
void testApp::mousePressed(int x, int y, int button){} | |
//-------------------------------------------------------------- | |
void testApp::mouseReleased(int x, int y, int button){} | |
//-------------------------------------------------------------- | |
void testApp::windowResized(int w, int h){} | |
//-------------------------------------------------------------- | |
void testApp::gotMessage(ofMessage msg){} | |
//-------------------------------------------------------------- | |
void testApp::dragEvent(ofDragInfo dragInfo){} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment