openGl屏幕上的控件 [英] controls on openGl screen
本文介绍了openGl屏幕上的控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
是否可以在openGL屏幕上放置控件按钮?
hello,
Is it possible to place control buttons on openGL screen??
推荐答案
不建议将本机"控件(使用GDI/GDI +绘制)添加到OpenGL中(或DirectX)窗口,请不要这样做.
但是,我可以检查此链接:
http://en.wikipedia.org/wiki/GLUI [
It is not recommaned to add "native" controls (drawn with GDI/GDI+) into an OpenGL (or DirectX) window, so don''t do that.
However, I can check this link:
http://en.wikipedia.org/wiki/GLUI[^]
This is an OpenGL based library to add controls into your OpenGL window.
The best option would probably be to:
- use a dialog box
- use a container for your OpenGL drawings (a Picture Control for example)
- put classical controls in the dialiog (do not place any control inside the OpenGL container)
- initialize your OpenGL device with the Picture Control handle (give an ID to your container, not IDC_STATIC, and get the handle withGetDlgItem(IDC_YOUR_ID)->m_hWnd
).
这篇关于openGl屏幕上的控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文