dwmkerr / sharpgl

Use OpenGL in .NET applications. SharpGL wraps all modern OpenGL features and offers a powerful scene graph to aid development.
MIT License
766 stars 300 forks source link

Add SetLastError to DllImport statements. #49

Closed robinsedlaczek closed 10 years ago

robinsedlaczek commented 10 years ago

Implementations for issue #43.

dwmkerr commented 10 years ago

@robinsedlaczek this looks sensible - just out of interest have you noticed any performance implications of this? If SetLastError is set to true then GetLastError will be called after every function call. Frankly if people are using OpenGL properly this shouldn't be too much of an issue, as you shouldn't have to call API functions thousands of times per frame, but I'd be interested to know if you've seen any impact

robinsedlaczek commented 10 years ago

@dwmkerr As far as I have some measurements of my own performance tests, I cannot see big problems. But these tests are not really academic. Maybe we should think about some performance test scenarios. There was a mail from me about that the last days.

Maybe a possible loss of performance here is covered by the performance improvements for #41? When I implemented #41, performance increase was measurable.

dwmkerr commented 10 years ago

I think that you're right that the improvements for #41 will cover this, I'll do some profiling before and after but I think it's right to get these changes in

robinsedlaczek commented 10 years ago

Hey Dave!

Sounds great! Looking forward to see it in the release!

Kind regards from Berlin!

Robin

Von meinem Windows Phone gesendet


From: Dave Kerrmailto:notifications@github.com Sent: ‎10/‎6/‎2014 6:08 To: dwmkerr/sharpglmailto:sharpgl@noreply.github.com Cc: Robin Sedlaczekmailto:robin.sedlaczek@live.de Subject: Re: [sharpgl] Add SetLastError to DllImport statements. (#49)

I think that you're right that the improvements for #41 will cover this, I'll do some profiling before and after but I think it's right to get these changes in


Reply to this email directly or view it on GitHub: https://github.com/dwmkerr/sharpgl/pull/49#issuecomment-57973189

robinsedlaczek commented 10 years ago

Hey Dave! Great again! :) Thanks a lot!