Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Cg Wrapper Class Problems

This topic is 5933 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

OK, im almost finished a wrapper class for Cg that im gonna be using. Im gonna release it to the community too ( of course ) but ive run into a simple problem i cant beat. I have 3 classes, a main wrapper class, and a pixel and fragment program class. The main wrapper only deals with getting a cg context and activatin/deactivating the shader programs, and the shaders themselves are responsable for loading themselves and binding their data, the problem ive hit is that i want the user just to be able to send their data to the shader and have it bind it accordingly. The way im doing it now (verrrrry ugly ) has them having to sent a structure containing: a pointer to the vertex/fragment data a numelements counter 2 arrays ( one for saying whether its uniform or not, and the other one the format of the data, indexed into using the numelements counter ) for determining data format Now this is really ugly and isnt hiding any of the core ugliness of having to write Cg enabled programs and i was wondering if anyone here had any ideas on how to make it look and seem 'nicer'? [EDIT] If you see this YannL, could you reply (even if you dont have an answer), YOU ARE MY GOD![END EDIT] [edited by - Hairybudda on September 13, 2002 3:27:01 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!