[Mono-winforms-list] OpenGL with Winforms

Dmitriy ddmk at r66.ru
Wed Jun 1 21:04:49 EDT 2005

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

More information about the Mono-winforms-list mailing list