Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: OpenGL on layered window  (Read 3161 times)

0 Members and 2 Guests are viewing this topic.

Qix

  • Full Member
  • ***
  • Posts: 139
  • I am Qix!
    • View Profile
    • Natoga Technologies
OpenGL on layered window
« on: September 25, 2012, 04:22:29 am »
Is it possible to set the native windows window to WM_LAYERED and draw on the window transparently? As in, clearing the window with a transparent color.
~ Qix
Creator of Rippl Studio
Code: [Select]
<danharibo> iostream: I don't do enough drugs to think that's a good idea.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: OpenGL on layered window
« Reply #1 on: September 25, 2012, 08:10:39 am »
Nop.

But you do it on your side: get the window handle (window.getSystemHandle()), and call SetWindowLong with GWL_EXSTYLE.
« Last Edit: September 25, 2012, 08:12:38 am by Laurent »
Laurent Gomila - SFML developer

Qix

  • Full Member
  • ***
  • Posts: 139
  • I am Qix!
    • View Profile
    • Natoga Technologies
Re: OpenGL on layered window
« Reply #2 on: September 25, 2012, 11:52:53 am »
And that will allow me to draw on a transparent window?
~ Qix
Creator of Rippl Studio
Code: [Select]
<danharibo> iostream: I don't do enough drugs to think that's a good idea.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: OpenGL on layered window
« Reply #3 on: September 25, 2012, 11:57:34 am »
I don't know how window transparency works. I thought you did, and just asked for a way to set the WM_LAYERED style ;)

So you should first read how window transparency works, and then see what problems need to be solved so that you can do it with a SFML window.
Laurent Gomila - SFML developer

Qix

  • Full Member
  • ***
  • Posts: 139
  • I am Qix!
    • View Profile
    • Natoga Technologies
Re: OpenGL on layered window
« Reply #4 on: September 25, 2012, 01:20:11 pm »
Ohhh I see what you mean. I'll give it a try; I've done graphics with transparent windows before using the native HDC system on Windows, but I didn't know if it was possible using OpenGL applications and such.

I'll give a try and let you know, Laurent ;)
~ Qix
Creator of Rippl Studio
Code: [Select]
<danharibo> iostream: I don't do enough drugs to think that's a good idea.