Cg problem: implicit binding broken?

Specs: PowerMac G4 OS X 10.3.3, ATI Radeon 9700 Pro, Cg-1.2.0b16.

I’m working with Cg’s runtime_ogl_vertex_fragment demo. The original demo.cpp program works on the above, I see a nicely Phong-shaded sphere. However, this uses glDrawElements to render.

I rewrote the demo.cpp code to use a more intuitive indexed vertex list and am using glNormal and glVertex to render the sphere. I added in wireframe, flat, and smooth shading along with the Cg runtime code for Phong shading. All modes except the Cg runtime work (in other words my code rewrite properly parameterizes the sphere). When switching to Phong shading (a la Cg), the sphere vanishes.

Since the original demo.cpp works, the ATI card supports arbvp1 and arbfp1. However, it seems to me that the driver is not properly performing the implicit binding between the glVertex and :POSITION code in the OGL and Cg programs, resp. (The same code works on a Linux box with an NVidia FX 5900.)

Could anyone offer advice as to what the problem is - is it the ATI driver? The card? Does anyone have a workaround? I have the rewritten demo.cpp code if anyone wants to test on a similar platform (NVidia confirmed that my code works on their G5 with and FX5200 board).

Thanks!

PS. I’d be willing to try to fit an NVidia card into my G4, but when I tried the FX9500U card, it would not fit due to its “double-wide” form factor (it would hit the power supply when trying to close the lid). If you can tell me which NV card might fit properly, I’d be willing to try it. (I have a DVI-ADC converter so I think I should be able to drive the ADC flat panel.) Thanks again!

The Cg stuff is brand new on Mac, I wouldn’t be surprised if there are problems on ATI cards.

For this problem, try posting to the mac-opengl mailing list where ATI engineers may get you an answer. And log a bug into RADAR where your modified demo.cpp can be forwarded right to them.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.