Jump to content
  • Advertisement
Sign in to follow this  

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

This topic is 4919 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.

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!