We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentLibraries,  Tool Development › Connecting a C++-based graphics lib to processing
Page Index Toggle Pages: 1
Connecting a C++-based graphics lib to processing? (Read 1018 times)
Connecting a C++-based graphics lib to processing?
Mar 5th, 2009, 6:12pm
 
Hello everyone,

I'm the author of libtisch, a C++-OpenGL-based library for multitouch development. I'd like to integrate it into Processing as an external library. I have created some Java bindings which seem to work; however, I'm not sure if there's any chance of success when calling OpenGL code written in C++ from Java, even if it's only inside the context created by Processing.

Has anybody any experience with mixing OpenGL and native code?

Many thanks, Yours, Florian
Re: Connecting a C++-based graphics lib to process
Reply #1 - Mar 7th, 2009, 1:00am
 
Sorry i can't help you solving that but :

That's a truely great news !
At least the so awaited multitouch library for Processing !
Please put me on the beta tester list !

Keep in *touch ;

Re: Connecting a C++-based graphics lib to process
Reply #2 - Mar 8th, 2009, 5:01pm
 
Hi again,

I'm a bit surprised myself but it's working: libTISCH is now running in Processing! :-D At the moment, it's still a bit hackish and some parts are missing, but the graphics seem to work - for the network communication part, a bit of refactoring might be needed.

I have one question regarding OpenGL, though: when I do something like this:

void draw() {
 background(0);
 container.draw(); // this is a JNI wrapper class
}

I just get a black background. However, this works:

void draw() {
 background(0);
 PGraphicsOpenGL pgl = (PGraphicsOpenGL) g;
 GL gl = pgl.beginGL();
 container.draw(); // this is a JNI wrapper class
 pgl.endGL();
}

Does anybody have an idea why?

Many thanks, Yours, Florian
Page Index Toggle Pages: 1