[.net] how to render a scene into a control with tao

Started by
4 comments, last by Rob Loach 18 years, 2 months ago
hello guys, i wonder how to render a scene into a control with tao. i browsed the examples of tao, but the windows all generated through the freeGlut functions. i try to write a program with menus, tool bars and opengl scene rendered in different panels to make a multiple view. how can i do that? is there any tutorial or example or something? thank you.
Advertisement
If you take a look at Tao.Platform.Windows, you'll find a SimpleOpenGlControl. Although I've never used it, I've heard it's rather nice to work with.
Rob Loach [Website] [Projects] [Contact]
thank you, i've never noticed it. i'll have a try.
hi, i found that control in the document, but is there any tutorial? the old site of tao is down, but i find some information from google cache. it seems the gl functions present in the override onpaint function. it is pretty weird, how the gl functions know which is the rendering control? can i just override other controls' onpaint function and just write gl functions in it?

another question is how to refresh the scene? call the onpaint function in a loop?
oh,oh one more thing is if i use this gl control, can i still use glut to detect the mouse and keyboard input?
Quote:Original post by billconan
oh,oh one more thing is if i use this gl control, can i still use glut to detect the mouse and keyboard input?
Why use GLUT if .NET does it for you [wink].

Either use the MouseMotion event or just override the OnMouseMotion method and you'll be good to go. Use it just like you'd use a normal control.
Rob Loach [Website] [Projects] [Contact]

This topic is closed to new replies.

Advertisement