How do I create a customized pixelformat?
How do I share display list between context?
How do I create a customized OpenGLContext?
You could choose the pixelformat when creating the OpenGLContext.
The OpenGLControl create its context in CreateContext(), override this method to return a
customized context.
When creating a context you could choose its pixel format and whith which other
context it will eventually share it's data. it's a simple 2 step creation process show
below:
protected override OpenGLContext CreateContext()
{
// choose your pixel format here
DisplayType mydisplay = new DisplayType(8, 8);
mydisplay.Flags = ...
// init your display
ControlGLContext ctxt = new ControlGLContext(this);
// here eventually display the list of available format
for(int i=0,n=ctxt.NumPixelFormat; i<n; i++)
Console.WriteLine(ctxt.GetPixelFormatAt(i));
// if one please you create with it with => ctxt.Create(i, null);
// toShare is an OpenGLContext with which ctxt share its display list, or null
ctxt.Create(mydisplay, toShare);
return ctxt;
}