Jump to content
  • Advertisement
Sign in to follow this  
cgrenderman

the prospect of " C for fraphics"

This topic is 4436 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Recently,i learns GPU programming on the basis of NVIDIA's CG lanuage. I want to know what you use when you develop games or other,hlsl or cg or glsl? Does GLSL be supported well in America? How the prospect of CG?

Share this post


Link to post
Share on other sites
Advertisement
I was tempted to just reply "HLSL" and leave it at that.

I have to say, I don't know much about the other 2, but there is no reason not to use HLSL (as far as I know). Its easy to learn/use and NVIDIA and ATI support their own environments for debugging code. It loads in DirectX with ease as well.

Share this post


Link to post
Share on other sites
Quote:
Original post by cgrenderman
Recently,i learns GPU programming on the basis of NVIDIA's CG lanuage.
I want to know what you use when you develop games or other,hlsl or cg or glsl?
Does GLSL be supported well in America?
How the prospect of CG?


I use CG, as I want to maintain API portability. Realistically, though, I could probably just stick to GLSL (I'll probably never get around to implementing a DirectGraphics renderer). CG is very similiar to HLSL (as in, almost identical).

You should probably just use whatever shader language is suited to whatever API you use, or just use CG if you need to support multiple APIs and don't want to rewrite shaders.

Share this post


Link to post
Share on other sites
They are different ways of doing the same thing. The provide a way to write high level code and use it on any graphics card. HLSL is supported by directX, GLSL by opengl only, and cg can support both. From what I have heard CG and HLSL are similar in syntax, while GLSL is a bit different.

All of them are perfectly supported on current graphics cards, so no need to worry.

Share this post


Link to post
Share on other sites
Also, in the unlikely event of console development, you'll use HLSL for XBox360, and Cg for PS3.

From what I've seen of Cg, it's HLSL but with worse error messages, and the annoying trait of making you pass all your global variables into each and every function. I'm hoping the reasons for the delay of the new FXComposer (I was expecting it 8 months ago) and Cg 2 are because developers are forcing them to fix these incredibly annoying parts of Cg. I'd imagine registered PS3 developers are the beta testers, and they're really pushing for some cool features and some fixes.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!