[Mono-osx] use OpenGL...

Ozy ozy4dm at yahoo.co.jp
Tue Apr 11 23:12:48 EDT 2006


Hello!

I want to use OpenGL function.
But do not work well..


For example
--------------------------------------

using System;
using System.Runtime.InteropServices;

class AAA {
	[DllImport("/System/Library/Frameworks/OpenGL.framework/ 
OpenGL",EntryPoint="glLoadIdentity")]
	static extern void glLoadIdentity ();

	static void Main() {
		glLoadIdentity();
	}
}

 > gmcs AAA.cs
 > mono AAA.exe

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Stacktrace:

in (wrapper managed-to-native) AAA:glLoadIdentity () <0xffffffff>
in (wrapper managed-to-native) AAA:glLoadIdentity () <0x80>
in AAA:Main () <0xc>
in (wrapper runtime-invoke) System.Object:runtime_invoke_void  
(object,intptr,intptr,intptr) <0x5c>
Abort


Mono version is 1.1.14.0.

Is my code wrong??

Thank you.


- Ozy



More information about the Mono-osx mailing list