0

I use PowerVR sgx sdk and the hardware platform is a Ti DM8168 chip with linux running on it.I make a openGL ES2 demo and found that the background of openGL demo is always black.I also compile QT lib with openGL sdk and make a Qt demo with QGLWidget, but the background of QGLWidget is also black.

glClearColor(0.0f, 0.0f, 0.0f, 0.0f);deoes not work.

first open fb0,and paint something.

then open GL painting.This will cover the whole screen.

In Qt demo, the QGLWidget always has a background cover the Widget behind it.Qt interface can not affect the openGL showing.

The powerVR demo didnot talk about this.It seems a tough thing on The embedded system.

I want that like this picture, the background is a Qwidget menu, and the square is openGL object in QGLWidget and back ground of QGLWidget is transparent.

Father, the QT always directly rend the openGL screen, so the rending content cover the framebuffer where other under layer widgets show.

enter image description here

4

1 回答 1

0

这并不难,而且是可能的。OpenGL(ESx)应用程序总是绘制到(全屏)帧缓冲区(当使用 NULL 窗口系统和独立的 openGLESx 应用程序时),或者在使用 QWS 时绘制到 Qt 窗口。

为了能够使此窗口透明,您可以执行以下操作:

(1) 在 DM8x 的 DSS 中的一个平面上绘制您需要透明的任何内容

(2)在DSS中将背景(非透明)框绘制到下平面

现在您可以使用每个平面的全局 Alpha 设置来管理顶层的可见性。有关此方法的示例,请参阅下面的线程。

http://e2e.ti.com/support/embedded/linux/f/354/t/70597.aspx

于 2014-02-12T04:08:45.657 回答