Jump to content
  • Advertisement
Sign in to follow this  

C#: OpenGL extension loading (or mapping a function pointer to a delegate).

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

Anyone who's ever tried to load OpenGL extensions under C# may have encountered a interesting problem. Extensions, function pointers in C, can be mapped nicely to delegates in C#. Under the 2.0 framework there is a Marshal.GetDelegateFromFunctionPointer() method that, well, does what its name suggests ;) All would be nice and well, but for one little thing: there is no such method under the 1.1 (either MS or Mono implementation) framework. Up to now I haven't been able to find a way to do the same under the current standard - and now I'm completely stuck. I now have two options: a) ditch C# and return to C++ (bad), b) ditch OpenGL and goto DirectX (very bad) or c) turn to the Gamedev for help. (I know that makes three, but hey!) Please, take a shot at this problem. A Cookie and an honorable mention in my games' credits await any who help this poor developer! :D

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!