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.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Cg + Processing... is it possible
Page Index Toggle Pages: 1
Cg + Processing... is it possible? (Read 415 times)
Cg + Processing... is it possible?
Oct 12th, 2008, 9:56pm
 
Cg is a really nice alternative to GLSL. I noticed that jogl_cg.dll lives inside Processing's opengl library folder so I thought it might be possible, but Processing runs into trouble when trying to load the native library. I tried in the PDE and in Eclipse, but it doesn't work in either. Anyone know a hacky way to get it to work?

Code:

import processing.opengl.*;
import com.sun.opengl.cg.*;

CGcontext cg;

void setup()
{
 size(640,480,OPENGL);
 cg = CgGL.cgCreateContext();
}

void draw()
{
 background(0);
}
Re: Cg + Processing... is it possible?
Reply #1 - Oct 13th, 2008, 2:40pm
 
ac posted a class in this thread a while back.

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=OpenGL;action=display;num=1159494801;start=9#9

I tried it out, but it was a few months ago so I don't remember what kind of results I got. CG is not something that comes with OpenGL "out of the box" so you need to run the toolkit installer from here

http://www.nvidia.com/object/cg_toolkit.html#downloads

hth
ryan
Re: Cg + Processing... is it possible?
Reply #2 - Oct 13th, 2008, 3:59pm
 
Thanks for the pointer to that thread. That looks like more than enough to get started. Also, yes, I needed to install Cg (duh!) and that got me past the native library linking problem.
Page Index Toggle Pages: 1