wanglei's picture

OpenTK + VS2005 C# + Windows Mobile 6

Hello,

Can I using OpenTK and VS2005 C# write a OpenGL ES app running on Windows Mobile 6?

The SimpleWindow20 (OpenGL ES 2.0) example raises an exception at startup.
"The application failed to load required components. If the compact framework is installed on a storage card, please ensure that the card is in place."

OpenTK cannot run on the compact framework at this time?

(My English is poor. ^_^)


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

No, the compact framework is not supported yet.

dzar's picture

Is there an update on this? Any particular reason that .NET CF cannot be supported? Anyone tried to rebuild for it? I'm new... looking to do some .NET CF development and willing to help if pointed in the right direction.

the Fiddler's picture

CF doesn't support Mashal.GetDelegateForFunctionPointer which is necessary for OpenGL extensions. It is also likely that WinMo lacks support for specific winapi functions. As far as I can tell, both issues can be worked around with some effort: the extension loader can be modified to avoid GetDelegateForFunctionPointer and missing winapi functions should be relatively easy to fix.

Check BindingsBase.cs:222 for the main usage of GetDelegateForFunctionPointer: commenting it out should be enough to fallback to DllImports. You'll also need to comment-out any other pieces of code that use this method, in order to get the project to build. Finally, defining IPHONE in the project build settings might also help the build process, if the CF is missing any other classes (like System.Diagnostics.Stopwatch - check Minimal.cs).

If OpenTK.dll builds at this point, the rest should be easy, otherwise more tweaking is in order. Let me know if you try your hand at this and I'll help where I can (and, of course, roll the necessary changes into the repository.)

Probably best if you used the code from the 1.0 branch on SVN.