A little code sample showing how to make Win32 like OpenGL 3.x and 4.x rendering contexts which can be attached to panels within a CLR Windows Form Application. Mixing Native C/C++ with C++/CLI can be pretty useful for making quick tools with shared code bases.
The basic code is in gl_canvas.h. The download contains a sample which makes 3 OpenGL canvases, two of which share a rendering context. It also uses a Timer to update the drawing of the panels. See the comments for more details.
Updated! 2012.04.02:
The sample now uses GLEW, also made it more flexible to create different context 4.1, 3.2 etc, and make it support the creation of multisampled pixel formats.
The sample now uses GLEW, also made it more flexible to create different context 4.1, 3.2 etc, and make it support the creation of multisampled pixel formats.
There are no comments yet.
No Comments Yet