Last active
August 29, 2015 14:05
-
-
Save tgfrerer/8e62e97d4c7f37cc6c89 to your computer and use it in GitHub Desktop.
test case : programmable GL renderer does not transform "vanilla" meshes.
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 "ofMain.h" | |
class ofApp : public ofBaseApp{ | |
ofEasyCam mCam1; | |
ofVboMesh mMshBackground; | |
public: | |
void setup(){ | |
mMshBackground = ofIcoSpherePrimitive(50, 3).getMesh(); | |
mCam1.setupPerspective(false, 60, 10, 10000); | |
}; | |
void draw(){ | |
ofBackground(ofColor::black); | |
mCam1.begin(); | |
ofPushMatrix(); | |
ofSetColor(ofColor::green); | |
mMshBackground.draw(); | |
ofSetColor(ofColor::red); | |
ofDrawSphere(0, 0, 50); | |
ofPopMatrix(); | |
mCam1.end(); | |
}; | |
}; | |
//======================================================================== | |
int main( ){ | |
ofSetOpenGLVersion(4, 1); | |
ofSetupOpenGL(400,300,OF_WINDOW); // <-------- setup the GL context | |
// this kicks off the running of my app | |
// can be OF_WINDOW or OF_FULLSCREEN | |
// pass in width and height too: | |
ofRunApp(new ofApp()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment