• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

OpenGL challenge!

Started by Patrice Terrier, October 15, 2007, 06:07:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Patrice Terrier

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? 
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Charles Pegge

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.

Patrice Terrier

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.

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Petr Schreiber

This is wild :)

I found just very little bits of info: click here
I think FBO ( frame buffer object ) could be used for the job. But I did not used it yet, just know others use it for similar tricks :)


Bye,
Petr
AMD Sempron 3400+ | 1GB RAM @ 533MHz | GeForce 6200 / GeForce 9500GT | 32bit Windows XP SP3

psch.thinbasic.com

Charles Pegge

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 :)

Patrice Terrier

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 Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Petr Schreiber

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
AMD Sempron 3400+ | 1GB RAM @ 533MHz | GeForce 6200 / GeForce 9500GT | 32bit Windows XP SP3

psch.thinbasic.com

Patrice Terrier

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?
;)


Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Petr Schreiber

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
AMD Sempron 3400+ | 1GB RAM @ 533MHz | GeForce 6200 / GeForce 9500GT | 32bit Windows XP SP3

psch.thinbasic.com

Patrice Terrier

Petr,

That would be nice  :)

I am working on the plugin version...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com