Archived

This topic is now archived and is closed to further replies.

nVidia's Cg ... a pretty dumb question

This topic is 5655 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 went to the nVidia website and downloaded the Cg kit. In the manual its talking about a Cg_Simple Visual Studio workspace that it comes with. I can''t actually find this workspace! I''m confused as hell. I''m probably just missing the obvious... I''m basically a beginner when it comes to graphics and this looks exciting as heck, so I just wanted to try it out even though I know I won''t be able to fully take advantage of it. Also, it gives a link to a site that tells how to set it up for use in Visual Studio. In the setup instructions it gives this line... "Add C:\Program Files\NVSDK\Cg\bin to your PATH environment variable". Eh? I suppose my not knowing what this means exactly shows my beginner state, but if anyone who knows a bit about this would like to teach a newbie a thing or two, I greatly appreciate it The multiverse is sloppy... I just make it neat

Share this post


Link to post
Share on other sites
Cg is not really aimed at complete beginners - you'll need a pretty good understanding of DirectX (or OpenGL?) before you can even begin to do anything useful with it. As I understand it, it is just a compiler type thing to make it easier to generate shader assembly code for pixel and vertex shaders - you write your shader in C style code, run it through the compiler and it spews out a load of assembler code that will run on your GPU.

I am also not 100% sure how much future there is in Cg - At some point DX is going to have to support high level shaders anyway, in order to keep up with OpenGL 2. If nVidia can persuade MS to use the Cg spec, then it has a future. However, from what I have heard, nVidia want to be able to license the spec left right and center, so MS would probably rather roll their own than fork out for Cg.

As for setting up environment variables, either add it to your Autoexec.bat under win9x, or right click on my computer, go to properties->advanced->environment variables and add it there under XP/2K.

[edited by - Sandman on June 24, 2002 8:01:42 AM]

Share this post


Link to post
Share on other sites
Thanks for the response, Sandman

I'm actually working on learning DirectX right now, but I thought that the Cg was neat enough to at least look into, at least just enough to take a peek at a couple of the things it can do.

Considering the rather large partnering with Microsoft with the development of the graphics card for the Xbox, and the fact that on the Cg developer page, developer.nvidia.com, it states "Developed by NVIDIA in close collaboration with Microsoft, Cg provides a clear path to create shaders in DirectX 8, DirectX 9, and OpenGL.", I have a strange feeling it'll end up being integrated into DirectX 9, because nVidia and Microsoft seem to be partnering and collaberating quite a bit.

The multiverse is sloppy... I just make it neat

[edited by - zer0wolf on June 24, 2002 3:45:30 PM]

Share this post


Link to post
Share on other sites