<p>I would like to create an overlay for one of my video games that I play. I've searched around a bit and can't find a repo that would allow me to draw vectors every 16 milliseconds (60fps) without taking a big performance hit.</p>
<p>Do any of you gophers know of a repo that will let me draw ontop of a window without taking a big munch out of performance?</p>
<p>Maybe something similar to GDI. I figure there's something out there that lets me draw vectors in realtime and I can just make the window background transparent.</p>
<hr/>**评论:**<br/><br/>emdeka87: <pre><p>You need to hook the draw calls of the target process and inject your own drawing code.
<a href="https://stackoverflow.com/questions/11810854/opengl-directx-hook-similar-to-fraps" rel="nofollow">https://stackoverflow.com/questions/11810854/opengl-directx-hook-similar-to-fraps</a></p>
<p>On windows this should be fairly simple using the right WinApi calls. You can draw the vector using DirectX (or the hooked API).</p>
<p>I assume go has bindings for these APIs</p></pre>69beards: <pre><p>perfect, didn't think about that. I found <a href="https://github.com/gonutz/d3d9" rel="nofollow">https://github.com/gonutz/d3d9</a>. thanks.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传