nvidia cg

habahaba
Unregistered
 
Post: #1
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 Sad ...
Any idea why this isnt working?

Thanks
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #2
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.
Quote this message in a reply
Member
Posts: 30
Joined: 2006.04
Post: #3
akb825 Wrote: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.
Quote this message in a reply
habahaba
Unregistered
 
Post: #4
icklefrelp Wrote: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?
Quote this message in a reply
Member
Posts: 30
Joined: 2006.04
Post: #5
habahaba Wrote: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.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #6
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.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Pbuffer problems on Intel NVIDIA GeForce 7300 GT NYGhost 5 4,044 Oct 26, 2006 09:39 AM
Last Post: NYGhost
  Heads up: glDrawbuffer(GL_FRONT) issue w/OS X 10.4.3 and NVidia cards zKing 4 3,464 Jan 11, 2006 01:00 PM
Last Post: arekkusu
  Multisample on NVIDIA GeForce 6800 archidea 1 2,783 Nov 8, 2005 12:22 PM
Last Post: OneSadCookie
  Help! shadow map bug in NVIDIA! dfmoore 13 6,394 Nov 1, 2005 07:26 PM
Last Post: OneSadCookie
  glBindTexture with ALPHA sux on NVIDIA Cards !? hgore69 1 2,915 Mar 12, 2005 01:35 PM
Last Post: OneSadCookie