简体   繁体   English

如何使OpenTK.GLControl透明

[英]How to make OpenTK.GLControl Transparent

I am using WPF and OpenTk and I have a GLControl that is set to Transparent, the clear color is set to Transparent as well but when it draws the rectangle it becomes black. 我正在使用WPF和OpenTk,并且我的GLControl设置为“透明”,透明色也设置为“透明”,但是当它绘制矩形时,它将变为黑色。 How do I make it so that it draws my rectangle on a transparent background, I have stuff behind the OpenTK.GLControl that I want to see along with the rectangle. 如何使它在透明背景上绘制矩形,我在OpenTK.GLControl后面有一些想要与矩形一起看到的东西。

Your OpenGL windows are regular Win32 windows. 您的OpenGL窗口是常规的Win32窗口。 They do not work with WPF's "I can't believe it's not a window" windows. 它们不适用于WPF的“我不敢相信这不是窗口”窗口。 You can't make an OpenGL window transparent in the way you want. 您无法以所需的方式使OpenGL窗口透明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM