openframeworks / openframeworks/openFrameworks
raspberry Pi render screwed when using both ofxOpenCv and GLES2
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
I've wrote this test program ( everything in the main.cpp ):
#include "ofMain.h"
class ofApp : public ofBaseApp{
public:
vector <ofVec2f> points;
ofVbo vbo;
void setup(){
points.resize(64);
float multiplier = TWO_PI / points.size();
for( size_t i=0; i<points.size(); ++i) {
points[i].x = 320 + cos( i*multiplier ) * 100;
points[i].y = 240 + sin( i*multiplier ) * 100;
}
}
void update(){ }
void draw(){
ofBackground( 0 );
ofSetColor(255, 0, 0);
vbo.setVertexData(&points[0], (int)points.size(), GL_DYNAMIC_DRAW);
vbo.draw(GL_LINES, 0, (int)points.size());
}
};
int main(){
ofGLESWindowSettings settings;
settings.glesVersion = 2; // changing this to 1 makes it work
settings.width = 640;
settings.height = 480;
ofCreateWindow(settings);
ofRunApp(new ofApp());
}
it should render some kind of circle, but if i put ofxOpenCv in the addons.make (without even including the header in my code) all the lines are screwed up, some of them follows the mouse, some others start in the upper left corner. It works when ofxOpenCv is not in the addons, or when it is included and the GLES render is set to 1. I'm using oF0.9.8 armv6 version on raspbian jessie, i've tested on rPi3 and rPi2. Any clue?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the rendering problem using the main.cpp program with ofxOpenCv listed in addons.make, comparing GLES2 with GLES1 on the Raspberry Pi setup described. Start from ofGLESWindowSettings and the ofxOpenCv addon inclusion, then verify that the VBO renders the expected circle consistently when the issue is fixed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, opencv, raspberry-pi
- Domain
- computer-graphics, computer-vision, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100