PDA

View Full Version : Embedded Qt OpenGL Backend



ebranson
15th March 2010, 17:53
I'm currently attempting to add OpenGL acceleration for Qt/Embedded Linux on a Power PC. I understand that I must implement a custom QScreen to correctly implement this. I have a couple of questions.

1. If I follow the Qt Documentation and implement QCustomRasterPaintDevice::memory() to return 0 then I must implement the QRasterPaintEngine::drawColorSpans() and QRasterPaintEngine::drawBufferSpan() functions to do the rendering. This is essentially just blitting the image, correct? If so, then is this really using the OpenGL paint engine for acceleration?

2. If I instead implement the QPaintDevice and QPaintEngine and make the OpenGL calls myself for the drawLines, drawRects, etc., then i seem to have an order issue. The widgets window background is first rendered in the in-active mode with all of its children widgets rendered on top of it. However, at the end of the render cycle Qt appears to be rendering the active background, which covers the previously rendered child widgets. How can I determine the order of the background rendering? If I know the order then I can use display lists to render the active background then the children. Is this an ordering issue, or could this have something to do with the clipping?

Thanks in advance