I’m pretty sure C# doesn’t have direct support for OpenGL, it does Direct 3D though. So you will have to use a library some of kind. Or even mix languaged together like C# and managed c++. There is an article on codeproject.com that mixes C# with MFC with managed c++ for OpenGL rendering. It’s found here: http://www.codeproject.com/csharp/csOpenGL.asp
I really can´t explain why the extensions are called with a “call memorydirection obtained from wglGetProcAddress”… I think is better to export these functions directly from opengl32.dll… perhaps was a design error in the 199X years…
Hehe and why why why why why why have I to create BEFORE the RC to call wglGetProcAddress without fail???
DESIGN ERRORS!!
[This message has been edited by santyhammer (edited 06-10-2003).]
Hey SGI, Java/c#/perl/VB users wanna make programs with OpenGL, so pls do something … is it fair that we have to use a f…ing C++ DLL parser to use the openGL extensions? come on, that´s not serious. 3th parties can die (look at lokiG), and then… what? SGI should move for ya! There are tons of other programming languages that aren´t C/C++ … wrappers are evil, DLL hell is bad.
[This message has been edited by santyhammer (edited 06-10-2003).]
That would have make extension writers beholden to Microsoft. Consider that they haven’t upadted OpenGL32.dll, pretty much, since it came out. Would you like to still be stuck with GL 1.1?
This way, the interface to GL32.dll is constant, but extendable. Granted, it poses a problem for languages like C#, but you can get around this easily enough by building a Managed C++ project (maybe even an unmanaged one) that can get these function pointers for you.
If it helps, there’s a code snippet on the dotnet forums that shows how to use LoadLibrary and GetProcAddress from C# using a small piece of IL code. I haven’t looked in much detail but you may be able to use a similar approach for wglGetProcAddress?
got it partially! I can call any method by using IL language. The question is… how can I to call MSIL code inside c# without compiling a DLL outside my class? Can I do
public class myClass
{
protected bool Init()
{
DoSomething();
}
Well, I’ll email him, but really dont wanna use an external DLL/OCX wrapper and enter the DLL hell, OCX registration, VB/MSV7 dll copy to system32… i waaaaaant a PURE c# solution ( if exists, hehe ).
[This message has been edited by santyhammer (edited 06-10-2003).]
[This message has been edited by santyhammer (edited 06-10-2003).]
Originally posted by santyhammer: I think the AssemblerListingLocation is only for C/C++ tool… and not sure what is for, but looks like other thing than __asm(msil)…
heh, this seems to be for creating the asm listing file during the code compiling, so now i see it’s really not what you was looking for
so it seems the only way to use asm in C# – is to write a DLL(or whatever else you can connect to C# written in C/C++) wrapper incapsulating the inline assembler inside of it =) (The same goes to OpenGL )
C# is a VEEERY powerful programming language ( from Microsoft ). Looks like java, but it´s more powerful.
Or, put in a less enthusiastic, but more accurate, way, C# is a Java-like language that compiles to the .NET interpreter. As such, it has full access to all of the services provided by various .NET objects. The language itself is very similar to Java; what makes it a nice (Windows-specific) alternative is that it can be extended much easier than Java. Writing a .NET object is trivial compared to writing C/C++ extensions to Java.
i waaaaaant a PURE c# solution ( if exists, hehe ).
You do realize that, by now, you could have written a .NET object that provides access to all the extension functions you need? This is not a difficult undertaking.
And no, there is no pure C# solution; the language isn’t designed to handle this kind of thing.