How to Compile CG into JOGL ??

Hi, all:

I’m trying to get CG support of JOGL.

My OS: Dell Latitude D830 (T7100) + WindowsXP
Display adapters: NVIDIA Quadro NVS 140M
NVIDIA Cg 2.2 April 2009: C:\Program Files\NVIDIA Corporation\Cg

In jogl.properties, I have

win32.c.compiler=vc9
windows.cg.lib=CHmmmProgram Files/Nvidia Corporation/Cg/lib

However, I really have no idea why I can’t produce those files related to CG.
So, is there any suggestion for me to gain CG support when using JOGL ?

Best Regards
JIA Pei

Have a look at the demo projects there are alot of nice examples about this.

Hi, Thank you for your reply.

I am just trying to compile the demo examples, say, it’s just


jogl-demons    src.demos.cg.runtime_ogl

However, there is always some error notification to say


import com.sun.opengl.cg.*;

is not existing. Which seems to tell that when I build my jogl, the cg component has not been produced.

Do you really have the files under “com.sun.opengl.cg.*” ??

I’ve got nothing named like this.

Any further suggestions?

Best Regards
JIA

I didnt face this error (make sure you have the jars in place) if you have the jogl jars in a folder point to it using -Djava.library.path=lib.

My advise is to get the demo code and setup a project and run it from eclipse or your favorite IDE

problem solved.

jogl.cg.jar and jogl_cg.dll are now produced by using

ant -Djogl.cg=1

Thank you for your reply.

Best Regards
JIA Pei