LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Simon Felix on July 05, 2009, 19:00:28

Title: Patch for Alpha-Transparency in Win32 icons
Post by: Simon Felix on July 05, 2009, 19:00:28
Hi there,

I know this is not the best way to submit patches, but I hope that this'll find the way into the next LWJGL version anyway. I attached the changed files.


This code adds support for alpha-blended icons under Win32. Documentation: http://support.microsoft.com/kb/318876

The exact changes I made are these two:
   window.h
   Changed WINVER from 0x0410 to 0x0500
   Reason: Alpha blended icons are only supported in Windows XP and onwards.

   org_lwjgl_opengl_Display.c
   Modified createWindowIcon (Lines 321-407) to use a BITMAPV5HEADER structure which supports alpha blended icons.


This code was tested under Windows XP SP3 (x86), Windows Vista SP2 (x64) and Windows 7 (x64).

Regards,
Simon


http://cultris.ath.cx/
Title: Re: Patch for Alpha-Transparency in Win32 icons
Post by: Simon Felix on July 05, 2009, 19:28:07
And here's the compiled binary to test this stuff.
Title: Re: Patch for Alpha-Transparency in Win32 icons
Post by: Matzon on July 06, 2009, 17:30:08
can you update to the latest source and then do a:
svn diff

I am getting some weird changes and want to make sure I get it in correctly.
Title: Re: Patch for Alpha-Transparency in Win32 icons
Post by: Simon Felix on July 06, 2009, 20:27:59
Here you go. Hope that helps.
Title: Re: Patch for Alpha-Transparency in Win32 icons
Post by: Simon Felix on July 06, 2009, 21:06:33
Here's a testcase:
http://cultris.ath.cx/test.exe