openFrameworks-RaspberryPi / openFrameworks

This repo has migrated into the openFramworks core! Please go to http://github.com/openFrameworks/openFrameworks for the latest!
http://github.com/openFrameworks/openFrameworks
Other
104 stars 11 forks source link

Remove all GLUT specific windowing from examples. #4

Closed bakercp closed 11 years ago

bakercp commented 11 years ago

Almost all of the examples name a glut window in their main.cpp file.

For instance:

#include "ofMain.h"
#include "testApp.h"
#include "ofAppGlutWindow.h"

//========================================================================
int main( ){

    ofAppGlutWindow window;
    ofSetupOpenGL(&window, 1024,768, 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 testApp());

}

If we migrate all of the source files to look like this:

#include "ofMain.h"
#include "testApp.h"

//========================================================================
int main( ){

    ofSetupOpenGL(1024,768, 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 testApp());

}

We can rely on the default windowing scheme in ofAppRunner.cpp (e.g. https://github.com/openFrameworks-RaspberryPi/openFrameworks/blob/master/libs/openFrameworks/app/ofAppRunner.cpp#L29)

This might be best be submitted as a core "issue".

bakercp commented 11 years ago

In fact, ideally I think that we would want to do something like this:

https://github.com/underdoeg/openFrameworks/blob/multiwindow/examples/other/multiwindowExample/src/main.cpp

bakercp commented 11 years ago

By the way, the above link is from @underdoeg's multiwindow glfw branch.

bakercp commented 11 years ago

Closed with 44888db4cfa23b5b281beaa0023d9679bcf5c585