Jump to content
  • Advertisement
Sign in to follow this  
EmptyVoid

Where to get started learning to use CG 2.0?

This topic is 3762 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

I've been looking for a simple example of how to use CG 2.0. I can find stuff about how to use the older versions but I'm not sure where to look for a example of how CG 2.0 works. Can someone point me in the right direction?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by MARS_999
http://developer.nvidia.com/object/cg_toolkit.html


Already been there no samples and the tutorials are old...

Share this post


Link to post
Share on other sites
Quote:
Original post by Moonshoe
Some of these use CG 2.0

http://developer.download.nvidia.com/SDK/10/opengl/samples.html


Two of them do but the code they use is kinda complex. I was looking for something like a program that creates a window and draws a triangle that's using a vertex and pixel shader.

I love Nvidia but there sample code is a little bit hard for a beginner to understand.

Share this post


Link to post
Share on other sites
Quote:
Original post by Moonshoe
Vertex and pixel shader tutorials.


"The first step (if it hasn’t been done already) is to download the Cg Compiler from nVidia. It is important that you download version 1.1, as nVidia appear to have made changes between version 1.0 and 1.1 (different variable naming, replaced functions, etc…), and code compiled for one may not necessarily work with the other."

As you can see this tutorial is for version 1.1 not 2.0

And the other one just makes no since to me because it's telling you how to load the pixel shader without telling how to do anything else such as how to load the header files etc.

[Edited by - EmptyVoid on July 25, 2008 3:59:11 AM]

Share this post


Link to post
Share on other sites
I started with CG 1.5 and only used the CgUsersManual.pdf that comes along with the download. This describes the functionality quite well, has short examples of how to load, compile and use shaders and some short samples as well.

Give it a try, the API isn't that complicated and if you have loaded your first shader it will get easier. Then start and look at other shaders (CG, GLSL, HLSL doesn't matter since the syntax is pretty similar and the most important things are the algorithms).

Share this post


Link to post
Share on other sites
Quote:
Original post by Lord_Evil
I started with CG 1.5 and only used the CgUsersManual.pdf that comes along with the download. This describes the functionality quite well, has short examples of how to load, compile and use shaders and some short samples as well.

Give it a try, the API isn't that complicated and if you have loaded your first shader it will get easier. Then start and look at other shaders (CG, GLSL, HLSL doesn't matter since the syntax is pretty similar and the most important things are the algorithms).


It is very important that I use CG 2.0 since it is the only version that supports the features of DirectX10 and I would think to use these features it would have needed to change allot form the older versions.

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!