ofSetCurrentRenderer in 0.9.0

I’m migrating some code to 0.9.0, and I need to use the ofGLProgrammableRenderer.

in 0.8.4 I was doing this brefore ofSetupOpenGL:


However, in 0.9.0 this function disappeared, and it seems that I have to create a window separately to then create the renderer and call the new ofSetCurrentRenderer function. Is it the correct way to do that? I can’t find an example in this OF version.

BTW, the pointsAsTextures example still has this code, that won’t probably compile:


in 0.9.0 you just need to set the GL version when creating the window in main.

something like:

#include "ofMain.h"
#include "ofApp.h" 
int main( ){    
    ofGLWindowSettings settings;    
    ofCreateWindow(settings);     // this kicks off the running of my app    
    ofRunApp(new ofApp()); 


Thanks @arturo :smile: