LWJGL Cg Support

Started by Frederick, September 07, 2007, 21:55:27

Previous topic - Next topic

Frederick

Hi!

First let me introduce myself: I am a german cs student trying to get into game development. And obviously I am trying to get down this road with java. I prefer LWJGL much to JOGL, just because it is more easy and more important it is single-threaded. That´s what lets me really stay away from JOGL.

So far everything is perfect, but I am missing one thing: CG support. You might ask why anybody would prefer CG to GLSL, but I found that Cg is better supported by Content Creation Tools. Have a look at NVidia Composer or XSI.

I am also aware that you are working on DirectX support, which is a great thing. It was a hard time for me to decide for java, knowing that it had no directx support. My point is, API agnostic development might be much easier with CG. Cg replaces great parts of both OpenGL and DirectX. The only purpose of this APIs will be sending vertex /texture  data down to the graphics hardware, the needed API-calls may be encapsulated easily. Renderstates will be set via the Cg runtime.
Just an idea what could be done.

The only weak point of Cg is, that its future is bound to NVidias. They might drop support, if it is not worthwhile anymore.  I believe Cg to be a technically superior solution, because it may serve DirectX and OpenGL equally, which is great.

So what I am asking, is there any support planned ? I am not a the point to dig into JNI at the moment. I am trying to finish a basic game  engine at the moment. I don´t have a clue what effort is needed to create a Cg binding. Is it sufficient to run the GlueGen utility or is more work needed ?

Maybe I would do it somewhere down the road, but at the moment it is more important for me to learn the basics !

So thanks! (also for that great library, like it better than SDL =)
Frederick

Matzon

Personally, I have no plans to add support for Cg. If someone provides a patch file for this, we would of coourse investigate adding this in an optional package of some sort.

Frederick

Okay, then I will have to figure this out on my own.

Thanks,
Frederick

princec

Have you considered the alternative GLSL?

Cas :)

Frederick

Yes sure =)

But I found that Cg Content Creation is nicer than GLSL. There is the CgFX format, there is COLLADA CgFx support. In theory there is also COLLADA GLSL but there is no implementation up to now. In comparison to NVidia Composer ATI´s rendermonkey is a bit rudimentary. I also have a look at XSI at the moment, and it seems to have great shader authoring support, but again only for Cg.

Then Cg makes the promise of API independence, and it supports older hardware too.
These all are strong plus points for Cg.
Big minus is, that it is unfortunately not standard.

Maybe I will stick with GLSL, when Blender becomes shader authoring support, after this Summer of Code. There are promising screenshots =)
I am unsure at the moment.

Another strong plus point for GLSL is, I wouldn´t have to do the JNI =) *lol*

So lots of blahblah - Yes I have definately considered it ;)