I just finished the OpenGL header for .NET I was working on the last weekend. If you work with .NET, maybe you will be so kind to look on it and tell your opinion. I know that there are already some libraries like tao(but only for .NET 1.1) and this another toolkit for .NET 2.0, but my library features platform-independent rendering context support(with unified pixelformat/visual handling). All you need is a handle of your window. Support for linux is not there yet, but it will(i’t a half of hour work, but I have no linux installed to do it now )
Features:
Supports ALL extensions ever
Platform-independent rendering contexts
Usable with Windows.Forms
for .NET 2.0 only
nice object-oriented syntax(all prefixes and suffixes stripped, the extension name is the class name)
Todo:
linux support
the pointer handling for arrays. Currently you must use custom marshalling
The Visual Studio C# solution(I simply zipped everything) is here
There is a small demo program included, but it doesn’t render anything. It just shows you how to do the setup.
I don’t know a lot about C++/CLI though. I don’t have Visual C# 2005 installed so I was hoping to get this to work with C++/CLI. I wouldn’t think this dll of yours would be C# only since it’s .net…
Hm, what does it say(i mean errors and such)? The ManagedGL.dll should be a valid .NET 2.0 assembly. Maybe you have .NET 1.1 installed? I am pretty new to .NET myself and I don’t know all the tricks yet… Maybe I’ll have to make it CLI-compliant…
You can download a free copy of visual studio here , if you need it… I did
Oh sorry, I was in a rush to leave so I forgot to put the errors, lol. I have Visual C++ 2005 express installed. I do have C# 2005 but not installed. So I would think by having C++ 2005 I do have .net 2.0.
I recompiled it with CLS compliancy, hovewer, i run in some troubles I had to place all tokens in GL.Tokens for a while, because they where colliding with the function names. I’ll se what I can do about it. Hovewer, I managed to use the library with chrome(a pascal .net compiler) so I guess it should be compartible now.
A stupid question: you did put the library as reference to your accembly, did you(I’m shure you did, but anyway…)
Originally posted by Zengar: A stupid question: you did put the library as reference to your accembly, did you(I’m shure you did, but anyway…)
Yes I did.
I tried the new dll and now the only errors are the first two I mentioned. The others went away. For some reason SelectConfiguration and CreateContext give errors. It must be something with how C++/CLI does things. I’ll keep at it. I’m getting a big C++/CLI book next week in the mail so perhaps I’m just not doing something quite right. I really would like to use your dll.
What’s weird is that when I type the :: after GLServer or RenderingContext intellisence comes up and shows me these two functions in the menu box. I really don’t know.
Oh, I guess I know it now(I didn’t see it at the first time)
The gnew operator creates a new object, right? In that case, delete it - the methods are static and they return valid objects already. Maybe I’ll have to change the syntax a bit :-/
Ah, hmm. I wonder why I had gcnew in there. Weird. Maybe since I knew to use the ^ operator I thought I needed a gcnew. Now I look at your C# example I see no new. Doh!
Anyway taking out the gcnew got rid of those errors. Now it doesn’t like me passing the Select function to SelectConfiguration. So I’m working on figuring out why I’m getting the can’t convert from blah to blah error.