Jump to content
  • Advertisement
Sign in to follow this  
Yaz

OpenGL CG OpenGL - multiple vertex programs

This topic is 3556 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

RE: CG shading language in OpenGL anybody out there know if it is possible if 2 or more vertex programs can be used in openGL? i've browsed through the CG forums and the PDF documentation and I know it does but theres no implementation or a brief guide as to how this is done - can someone please shed light onto this? thankyou. Yaz

Share this post


Link to post
Share on other sites
Advertisement
GPUs execute 1 vertex program. If you want, edit the text so that the 2 programs become 1 and compile.

Share this post


Link to post
Share on other sites
thankyou for your reply..
could you please elaborate the last response?

the scenario i'm working is this:
i have 2 vertex programs and 1 fragment program, 1 vertex program is billboarding objects, the remaining 1 vertex and fragment programs are doing the lighting.

are you suggesting combining all 3 programs into one thus using the cgCombo() function?

thanks

Yaz

Share this post


Link to post
Share on other sites
I can't tell you what cgCombo() does.
I'm saying if you have 2 vertex shaders, one of the them with the main function and another that just has some function for doing lighting, then it is a matter of putting the 2 shaders together with some string operations.
Either you use stl:string if you are into C++, or strcpy, strcat for C or C++, and so on.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!