CG errors in jogl-demos...

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

CG errors in jogl-demos...

jiapei100

Hi, all:

I guess current jogl (in jogamp) doesn't support CG because I can't find the files named
CGcontext.java, CGprogram.java, CGparameter.java, CgGL.java, etc.
In such case, 3 files under jogl-demos/src won't be able to be compiled.

1) demos.cg.runtime_ogl/cgGL_vertex_example.java
2) demos.cg.runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java
3) demos.hdr/CgPipeline.java

My question is
1) is it possible that because my computer is with ATI video card, so that some of the classes files built upon the native codes    haven't been produced, which may have defined CGcontext, CGprogram, CGparameter, CgGL, etc.???
2) An additional silly question: Is CG only for NVidia Video Card?

Thank you very much.

Cheers
Pei
Welcome to Vision Open http://www.visionopen.com
Reply | Threaded
Open this post in threaded view
|

Re: CG errors in jogl-demos...

Wade Walker
Administrator
Hi Pei,

It looks like Cg can be compiled to GLSL (for OpenGL) or HLSL (for DirectX), so using GLSL it should work on ATI cards. You might be able to convert the demo to GLSL using the Cg compiler, that way it would work on either nvidia or ATI with no extra steps.

Reply | Threaded
Open this post in threaded view
|

Re: CG errors in jogl-demos...

jiapei100


Hello, Walker:

Sorry for my stupidity. I should specify "-Djogl.cg=1"
ant -Djogl.cg=1


Wade Walker wrote
Hi Pei,

It looks like Cg can be compiled to GLSL (for OpenGL) or HLSL (for DirectX), so using GLSL it should work on ATI cards. You might be able to convert the demo to GLSL using the Cg compiler, that way it would work on either nvidia or ATI with no extra steps.
Welcome to Vision Open http://www.visionopen.com
Reply | Threaded
Open this post in threaded view
|

Re: CG errors in jogl-demos...

Wade Walker
Administrator
Make sure you collect your notes while you build these projects -- we can put it on the wiki to help others later on