Jump to content
  • Advertisement
Sign in to follow this  
white skies

C# + openGL

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

Advertisement
Quote:
Original post by white skies
Hi!
Can I use the regular openGL dlls with C#? [smile]


Yes.

Since they are not .net clr managed stuff you will need to use pinvoke to access them. The web site pinvoke.net has a collection of some of the methods. Google can find more.

Either that or you can hunt for a wrapper that somebody else has written.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
just a note though: using PInvoke may be what people suggest first but having the PInvoke mechanism kick in for every function call to opengl might be a little expensive (in practice it's not so bad. PInvoking every function is how many wrappers out there are doing it). in managed directx microsoft is trying to minimize the PInvoke calls as much as possible. i don't know if such a library exists for c# and opengl or if tao.gl minimizes PInvoke calls. that said, there are many successfull and performant apps out there using tao.gl or other c# wrappers.. so maybe you should just forget what i said. i just wanted to point out that there's two ways of exposing opengl: a 1 to 1 wrapper or something that tries to minimize calls to the unmanaged dlls; you'd prefer the latter.. but maybe only the first one is available.

cheers,
simon

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!