在带有 X11 的 Linux 上,我修改了一段datenwolf 的代码,以在具有纯色背景的透明窗口上绘制一个透明立方体。
这是代码:
/*------------------------------------------------------------------------
* A demonstration of OpenGL in a ARGB window
* => support for composited window transparency
*
* (c) 2011 by Wolfgang 'datenwolf' Draxinger
* See me at comp.graphics.api.opengl and StackOverflow.com
* License agreement: This source code is provided "as is". You
* can use this source code however you want for your own personal
* use. If you give this source code to anybody else then you must
* …Run Code Online (Sandbox Code Playgroud)