View Full Version : nvidia cg
habahaba
2006.08.02, 07:53 AM
Hi,
I'm trying to work with some shaders on my macbook pro. I downloaded the toolkit, included the framework in my xcode project, and wrote:
...
CGcontext cgContext;
...
cgContext = cgCreateContext();
...
however, cgContext is NULL and the application ends :( ...
Any idea why this isnt working?
Thanks
akb825
2006.08.02, 12:37 PM
I don't think ATI graphics cards support cg directly. (since it is a NVidia language) You will need to compile the shaders into assembly, then use the corresponding functions for assembly shaders.
icklefrelp
2006.08.02, 01:48 PM
I don't think ATI graphics cards support cg directly. (since it is a NVidia language) You will need to compile the shaders into assembly, then use the corresponding functions for assembly shaders.
That's not actually true, I have been using Cg on my G4 Powerbook (Mobility Radeon 9600) since I got it a few years ago. You are restricted to using the ARB profiles but other than that it should generally work ok.
Saying that though, I am now moving to GLSL which integrates much better with OpenGL. If you know one, switching to the other is trivial.
habahaba
2006.08.02, 02:15 PM
That's not actually true, I have been using Cg on my G4 Powerbook (Mobility Radeon 9600) since I got it a few years ago. You are restricted to using the ARB profiles but other than that it should generally work ok.
Saying that though, I am now moving to GLSL which integrates much better with OpenGL. If you know one, switching to the other is trivial.
do you use GLEW ?
and one more thing: whats this AGL and GLX things? there are downloads of glew binaries for both, which one should i choose?
icklefrelp
2006.08.02, 02:26 PM
do you use GLEW ?
and one more thing: whats this AGL and GLX things? there are downloads of glew binaries for both, which one should i choose?
I don't use GLEW although I should probably look into it, currently I don't check for supported extensions as I know the extensions I'm using are supported on my machines.
I assume you want the AGL version, I'm guessing the GLX version is for OpenGl on X11.
OneSadCookie
2006.08.02, 05:36 PM
Cg should work fine, but doesn't give you access to the full power of any modern ATI hardware (including the X1600 in yourMBP). It's also not a technology many people use on the Mac. I'd highly recommend using GLSL.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.