jvcleave / ofxRPiCameraVideoGrabber

development of ofxRPiCameraVideoGrabber, an addon to control the native Raspberry Pi camera in openFrameworks
89 stars 17 forks source link

Error with of v0.9 programable render #11

Closed mcanet closed 8 years ago

mcanet commented 8 years ago

I am trying now with of 0.9.0. with Raspbian Jessie I am getting following error while trying to compile example "/home/pi/openFrameworks/apps/myApps/example-non-texture":

/home/pi/openFrameworks/addons/ofxRPiCameraVideoGrabber/example-non-texture/src/main.cpp:8:53: 
error: could not convert ‘ofGLProgrammableRenderer::TYPE’ from ‘const string {aka const std::basic_string<char>}’ to ‘std::shared_ptr<ofBaseRenderer>’

Seems that in v.0.9 they have change way programable render it is setup: http://blog.openframeworks.cc/post/133400454159/openframeworks-090-opengl-45

jvcleave commented 8 years ago

Yeah - I haven't updated the examples for 0.9.0 yet

mcanet commented 8 years ago

I make it work like this:

ofGLWindowSettings settings; settings.setGLVersion(3, 2); // Programmable pipeline settings.width = 1280; settings.height = 720; ofCreateWindow(settings);

then the line of ofRunApp like you have. I guess if you want can left a branch for people for v0.8.4 and then master move to v0.9

jvcleave commented 8 years ago

Yeah - here is a long one I use that still allows for 0.84

#include "ofMain.h"
#include "ofApp.h"
#if (OF_VERSION_MINOR != 9) && defined(TARGET_OPENGLES)
#include "ofGLProgrammableRenderer.h"
#endif

#define FORCE_PROGRAMMMABLE 1

#ifdef FORCE_PROGRAMMMABLE
#include "ofGLProgrammableRenderer.h"
#endif
int main()
{
    ofSetLogLevel(OF_LOG_VERBOSE);
#if defined(TARGET_OPENGLES)
    #if (OF_VERSION_MINOR == 9)
        ofGLESWindowSettings settings;
        settings.width = 1280;
        settings.height = 720;
        settings.setGLESVersion(2);
        ofCreateWindow(settings);
    #else
        ofSetLogLevel("ofThread", OF_LOG_ERROR);
        ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);
        ofSetupOpenGL(1280, 720, OF_WINDOW);
    #endif
#else
#ifdef FORCE_PROGRAMMMABLE
    ofGLWindowSettings glWindowSettings;
    glWindowSettings.width = 1280;
    glWindowSettings.height = 720;
    glWindowSettings.setGLVersion(3, 2);
    ofCreateWindow(glWindowSettings);
#else
    ofSetLogLevel("ofThread", OF_LOG_ERROR);
    ofSetupOpenGL(1280, 720, OF_WINDOW);
#endif

#endif
    ofRunApp( new ofApp());
}
mcanet commented 8 years ago

This is very good!

jvcleave commented 8 years ago

fixed with f91205e8f5cb4a2c91bc893f5f6d4c304fc087f0