Patch for Alpha-Transparency in Win32 icons

Started by Simon Felix, July 05, 2009, 19:00:28

Previous topic - Next topic

Simon Felix

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/
Download Cultris II, the fastest Tetris clone from http://gewaltig.net/

Simon Felix

And here's the compiled binary to test this stuff.
Download Cultris II, the fastest Tetris clone from http://gewaltig.net/

Matzon

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.

Simon Felix

Download Cultris II, the fastest Tetris clone from http://gewaltig.net/

Simon Felix

Download Cultris II, the fastest Tetris clone from http://gewaltig.net/