Help please! Open GL problem!

edited December 2015 in Library Questions

Hello.

This is urgent. Please help. I am trying to connect processing to madmapper, but for some reason I am getting this error:

"OpenGL error 1282 at top endDraw(): invalid operation"

My code:

    import codeanticode.syphon.*;
    PGraphics canvas;
    SyphonServer server;

    void setup() {
    size(400,400, P3D);
canvas = createGraphics(400, 400, P3D);

// Create syhpon server to send frames out.
server = new SyphonServer(this, "Processing Syphon");
}

void draw() {
canvas.beginDraw();
canvas.background(100);
canvas.stroke(255);
canvas.line(50, 50, mouseX, mouseY);
canvas.endDraw();
image(canvas, 0, 0);
server.sendImage(canvas);
}
Sign In or Register to comment.