
Render into Buffer while having a GLWindow open in Form Dialog
Posted Monday, 26 December, 2011 - 00:38 by OnlyMicha| Project: | The Open Toolkit library |
| Version: | 1.0-2010-10-06 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | OnlyMicha |
| Status: | closed |
Jump to:
Hi, hope this is the correct position to ask and sorry for bad english...
System : Windows 7
VS 2010
VB.NET
I have a Form with a OpenGL Control inside thats working fine.
Inside a background calculation I need to render a top-view image of a different 3D Object.
To do that I make a new OpenTK.GLControl
- Setup .Width .Height .Ortho and Viewport, then put triangles in and read the image with GetPixel()
Problem : .Width and .Height only make a result if I read out aspectratio into a variable after setting it (maybe a bug)
but then it works -> next problem then, the main OpenGL Window inside my Form/Dialog is empty,
I think its resized also when resizing the Control inside the sub ?
Before OpenTK I used Tao , inside Sub I build a new SimpleOpenGLControl -> that worked fine, with OpenTK not
Can someone help me with this ? I also searched for 'Render in Background' but I dont understand that completely...
Thx


Comments
#1
I solved it :
in Main Draw cycle I add GLControl.MakeCurrent() to get the rendering back from the Sub procedural.