Cg Parameters with Vertex Buffers?

Started by
2 comments, last by nomadman2003 18 years, 9 months ago
I have a program that is working well by using DrawElements (a vertex buffer). I wanted to integrate Cg into the project. How can I pass position to my vertex shader and still use DrawElements? I could do this in immediate mode but I would like to keep my vertex buffer. NOMADMAN!
Advertisement
Does OpenGL pass vertex information to each vertex shader processed during a call to DrawElements. Can I expect to have a POSITION input in my vertex shader without explicitly setting the position parameter each vertex?

(If you didnt figure it out by now I'm terribly new to Cg and shders in general)

NOMADMAN!
There are examples in the Cg documentation. On the bit about the OpenGL Runtime. I suggest you take a look.
If at first you don't succeed, redefine success.
Thanks, I never took the time to read that thing, in fact I forgot it existed.

I will be more dilegent next time before asking the forums for help.

(If any one else is interested the function cgGLSetParameterPointer was what I was looking for)

NOMADMAN!

This topic is closed to new replies.

Advertisement