我想在非桌面虚拟环境中使用Windows(例如虚拟房间中的3D用户界面),但我几乎不知道如何最有效地实现它。我将使用OpenGL来呈现用户界面和虚拟环境。我知道我可以通过将每个程序窗口角落的当前像素位置映射到用户界面中的缩放对应点然后重新渲染相应区域中的所有纹理来实现这一点,但这将非常繁琐。有没有更简单,更有效的方法来使用一些Windows API或利用Windows渲染程序的方式?谢谢。
I would like to work with Windows in a non-Desktop virtual environment(for example 3D user interface in a virtual room) but I have almost no clue how to most efficiently implement this. I will be using OpenGL to render the user interface and virtual environment. I know that I could possibly implement this by mapping the current pixel locations of the corner of each program window to a scaled corresponding points in the user interface and then rerender all the textures in the corresponding area but this would be extremely tedious. Is there an easier and more efficient way to do this using some windows API or by taking advantage of how windows renders programs? Thanks.
推荐答案您应该使用Windows-API获取屏幕坐标并在OpenGL代码中使用它们。 OpenGL应该将绘图直接处理到Windows中的显示驱动程序。 you should use the Windows-API to get the screen coordinates and use them in your OpenGL code. The OpenGL should direct process the drawing to the display driver in the Windows.
更多推荐
如何在虚拟环境中呈现Windows程序
发布评论