I would like to be able to draw OpenGL directly onto the VISTA composited GLASS (DWM)
as I am doing with my GDImage Carousel demo.
I think it could be done if we draw in a 32-bit DIB instead of Window DC, however so far I didn't succeed doing it.
Any thought?
I suspect that nearly all the compositing is done directly inside the graphics hardware video buffers, which is why Vista is so picky about graphics cards. Vista may be using the same mechanisms as the Opengl/DX device drivers themselves.
I think that one part of the problem is that the ARGB pixel organization is not the same.
For example to convert a GDIPLUS image into OpenGL texture I must perform first, RED and GREEN byte permutation.
This is wild :)
I found just very little bits of info: click here (http://www.mesa3d.org/brianp/sig97/offscrn.htm#wgl)
I think FBO ( frame buffer object (http://www.opengl.org/registry/specs/EXT/framebuffer_object.txt) ) could be used for the job. But I did not used it yet, just know others use it for similar tricks :)
Bye,
Petr
Yes you have to swap all the red and blue bytes for each pixel. This BGRA (or ARGB) format is a legacy from Silicon Graphics and their original video hardware. Perhaps, after laboriously swapping them about, PC video Opengl drivers have to swap them all back again :)
Well this looks like a good reason to switch to DirectX, because composited drawing is a built-in feature in DirectX 10 (WPF).
I wanted to add extra visual plug-ins to BassBox using this technic, but so far it is easier for me to do it using GDImage.
Patrice,
I am not sure if this is what you want, but have a look at this link:
http://www.dhpoware.com/demos/glLayeredWindows.html
It is Visual C++ / OpenGL project, but it displays cube without any window border, looks quite good :)
Petr
Petr,
Yes it works fine, however the WS_EX_LAYERED extended style can only be used with popup window.
Thus there is extra work to embed the popup, inside the player, and make it works like a child window.
What about some more visual plug-in contributions?
;)
Quote
What about some more visual plug-in contributions?
:) I am now working on update to thinBASIC based graphic miniengine, so quite busy creating all the docs/sample scripts/test scripts.
But during this process I get lot of ideas for visualisations, so when I will release it I will have more time and will try to create something for BassBox too :)
Petr
Petr,
That would be nice :)
I am working on the plugin version...