ands / borderless-window-opengl

Demonstration of alpha blended compositing of OpenGL contexts via borderless windows using the Win32 API
92 stars 7 forks source link

Does not work in Win10 #1

Open r-lyeh opened 6 years ago

r-lyeh commented 6 years ago

Sorry for not being very helpful with this :)

image

r-lyeh commented 6 years ago

Ah, fixed it. Had to remove only WS_EX_LAYERED flag when creating window. After that the window is fully working, but alpha blending is gone (which I personally prefer it out).

ands commented 6 years ago

Hmm, that's unfortunate :) I'll see if I can test/fix this on a Win10 machine

ands commented 6 years ago

Unfortunately, I can't get OpenGL to work correctly with at least intel graphics drivers. It just won't allow me to get a viewport outside the original client rect. So I can't render over the window border :(. That's why I actually moved back to WS_POPUP windows in the opengl3-multiwindow branch. Unfortunately, the window tiling feature (Win key + arrow keys) does not work with WS_POPUP windows. So I have to reimplement parts of it myself at some point...

Does the opengl3-multiwindow branch work better for you? :)

r-lyeh commented 6 years ago

Nope, it is even worse :) Only window shadow is visible. Canvas and buttons are completely hidden. Attached a picture, the current text & content is actually the browser in the background.

PS: did you read that I got it to work by removing the WS_EX_LAYERED flag?

image

ands commented 6 years ago

Dang. That's unfortunate. I didn't find a way to reproduce this yet. Will try a couple more systems over the next few days/weeks though.

Regarding removing the WS_EX_LAYERED flag: That disables alpha compositing for me, which I want to keep. Did alpha compositing still work for you (was the window partially transparent)?

kphillisjr commented 4 years ago

@r-lyeh - Have you tried running the example recently? I am able to get this demo working as intended on Windows 10 version 1909.

ands commented 4 years ago

Hey @kphillisjr ! I'm actually running the ogl3 version of this code in my game engine for quite a while. Even on Win 10 I haven't seen any issues so far.