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

advanced3d example fails to compile (moved from pirate pad) #7

Closed bakercp closed 11 years ago

bakercp commented 11 years ago

Log:

OF_ROOT/example/3d/advanced3d throws the following errors when compiling:
src/OrthoCamera.cpp: In member function ‘virtual void orthoCamera::begin(ofRectangle)’:
src/OrthoCamera.cpp:49:67: error: ‘glOrtho’ was not declared in this scope
make: *** [obj/Release/src/OrthoCamera.o] Error 1
bakercp commented 11 years ago

This is likely because GLEW is not working correctly with RPI+OF

There is a libglew-dev package available for raspberry pi -- normally we include glew.h and and such in utils/ofConstants.h

Currently all glew stuff is excluded from TARGET_RASPBERRY_PI -- this may be the place to fix it.

There seems to be a conflict between the GLES/2 EGL headers and the libglew-dev packages ...

bakercp commented 11 years ago

after fixing the errors in this app I'm getting the following CREATED SCREEN WITH SIZE 1920 x 1080 terminate called after throwing an instance of 'Poco::SystemException' what(): System exception Aborted

danzeeeman commented 11 years ago

EasyCam is throwing the 'Poco::SystemException' after removing the the EasyCam I only get a seq-fault

bakercp commented 11 years ago

Yeah, same issue with easycam and ofEvents.

Also, I just noticed -- OrthoCamera.cpp uses glOrtho, which is not GLES friendly. For an example of a work around, for glOrtho, look inside ofCamera.cpp. We should probably update this example. More specifically, in ofCamera, we do this inside the begin() method:

#ifndef TARGET_OPENGLES
        glOrtho(0, viewport.width, 0, viewport.height, nearClip, farClip);
#else
        ofMatrix4x4 ortho;
        ortho.makeOrthoMatrix(0, viewport.width, 0, viewport.height, nearClip, farClip);
        ofLoadMatrix( ortho );
#endif

The same might be done in OrthoCamera.cpp.

bakercp commented 11 years ago

Fixed with #65