如何在虚拟环境中呈现Windows程序

编程入门 行业动态 更新时间:2024-10-27 16:38:55
本文介绍了如何在虚拟环境中呈现Windows程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在非桌面虚拟环境中使用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程序

本文发布于:2023-11-24 03:01:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623732.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:环境   程序   如何在   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!