Bug in Cg sample demo

The sample program called “cgGL_vertex_sample.c” has a bug in the cg shader. The problem is in the #pragma bind’s. The first one is ok where it binds appdata.postion with ATTR0, but the other two is the problem. Where in the example is shows:

#pragma bind appdata.normal = ATTR1;
#pragma bind appdata.color = ATTR2;

Should read:

#pragma bind appdata.normal = ATTR2;
#pragma bind appdata.color = ATTR3;

ATTR1 is the vertex weight, NOT the normal. Simple mistake is all.

If I find anything else ill post.

-SirKnight

[This message has been edited by SirKnight (edited 06-13-2002).]

Oh ya i almost forgot one other bug. Where the actual drawing with glVertex and whatnot is done, right after that this func is called:

cgGLDisableProgramType(cgFragmentProfile);

This should be:

cgGLDisableProgramType(cgVertexProfile);

Wierd how it still works fine with out changing it to cgVertexProfile.

-SirKnight

[This message has been edited by SirKnight (edited 06-13-2002).]

These have been fixed and will be in the next release.

Thanks for the bug report!

sorry to bitch you sirknight, but this is offtopic.

please move over to this forum: http://www.cgshaders.org/forums/

take it easy

Whats wrong with reporting bugs about something from NVIDIA? People do it all the time with driver bugs. That is just as “off topic” as this. This really isnt offtopic though. Its not like im asking how do i texture map a quad in opengl. Or how do i declare a pointer to a function. See, i also knew that jra101 was here so i just posted the bugs here. Plus i wanted everyone else here to see it and fix it themselfs if they wanted to.

-SirKnight

There are NVIDIA people on the Cg forum too…

why it is offtopic?
because its a question/report about cg, not gl (the first one). for cg-stuff, go to the cg forum. thats what it is for

it was just a joke man… but in every joke there is some truth anyways…

as i said
take it easy

We do browse the Cgshaders forum as well so this kind of stuff should probably be posted there

Well you see you have to keep in mind that at the time i did not know about the cgshaders.org website. I just d/l’ed the compiler from nvidia and started playing with it. It wasnt untill later on that day (after i posted my bug report) that i found out about that site.

Yes i do know there are nvidia people at that cg forum too. I found that out last night also.

And actually, i dont care if my post WAS offtopic. Everyone here has made off topic posts before. You know, i dont even know why im arguing with this. Its totally stupid. Normally i ignore the comments like “this post is off topic go elsewhere…blah blah blah” and stuff like that. O well, i really dont care, lets just end this. :stuck_out_tongue:

-SirKnight

SirKnight should be publicly flogged and humilated for posting this off-topic post! (j/k)

Seriously, guys, what’s the big deal. It’s not like he was posting things I’ve seen like, “Quake 3 keeps giving me OpenGL errors, what do I do?,” by some newbie who doesn’t understand that this is the programmer’s forum and not a technical support forum for OpenGL games.

Lighten up a little.

In daveperman’s defense, I originally thought he might have said it in a joking manner, but I couldn’t be sure…