[Mono-winforms-list] OpenGL with Winforms

Jonathan S. Chambers Jonathan.Chambers at ansys.com
Wed Jun 1 23:25:06 EDT 2005

If I recall correctly (if...), I think the post on the Tao message board said something on the order of looking at what Gtk does to support an OpenGl control (GtkGLExt I believe), and do the same thing in C#. Does this sound right, anybody that would know? If so, I'll take a look at it and let you know (and you vice versa).

- Jonathan

-----Original Message-----
From:	mono-winforms-list-bounces at lists.ximian.com on behalf of Dmitriy
Sent:	Wed 6/1/2005 9:04 PM
To:	winforms
Subject:	Re: [Mono-winforms-list] OpenGL with Winforms
If you can remember i ask for same problem at 12.10.2004:

How to link(bind) OpenGL to window, which was created with MONO SWF?

for Windows and Microsoft .NET it is not a problem:
We get a handle from window in C# code and in C++ code

void Create(HWND hwnd/*Control.Handle */)

  int iPixelFormat = ChoosePixelFormat(dc,&rPFD);
  if(!SetPixelFormat(dc,iPixelFormat,&rPFD)) FAIL("SetPixelFormat failed!");
  if(!(hRC = wglCreateContext(dc))) FAIL("wglCreateContext failed!");
//we have OpenGL context

How TODO so under mono and linux?

May be you put answer to you website in FAQ?

----- Original Message ----- 
From: "Jonathan S. Chambers" <Jonathan.Chambers at ansys.com>
To: "winforms" <mono-winforms-list at lists.ximian.com>
Sent: Thursday, June 02, 2005 3:23 AM
Subject: [Mono-winforms-list] OpenGL with Winforms

As a side project, I'm playing around with an OpenGl WinForms
app. I have this working on Windows with both Mono and .Net. I use wgl
calls to setup a control for OpenGL rendering (very similar to what is
done for the OpenGL control in Tao). My question is, does anyone know of
where to look for similar code for Linux? I believe there used to be
something on the Tao messageboard, but that's down now. I'm guessing I
need to do some PInvokes into the GLX library, but has anyone done this
before (is it possible with Mono's SWF implementation)?


Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com

Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com

More information about the Mono-winforms-list mailing list