Bug 718 - Windows BITMAP Offscreen Fails w/ GLCaps other than simple RGB888
Summary: Windows BITMAP Offscreen Fails w/ GLCaps other than simple RGB888
Alias: None
Product: Jogl
Classification: JogAmp
Component: windows (show other bugs)
Version: 2
Hardware: pc_all windows
: --- major
Assignee: Sven Gothel
Depends on:
Reported: 2013-04-17 12:49 CEST by Sven Gothel
Modified: 2013-04-18 20:52 CEST (History)
0 users

See Also:
Type: ---
SCM Refs:
1af639340bb119e4839170c6e5e3258012d99136 61a47e07975eb2fd8b1f5f60552935c993a6eef6 db24615ebaebcda88ffb7275d3a60e6400226099 4d2f4a1b75dc176b2b46de5076b587b70988ac42 0a7cd9c58537d80131dbebf102f1f639ca0eb334
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2013-04-17 12:49:00 CEST
[a] WindowsBitmapWGLDrawable's BITMAPINFOHEADER's BiBitCount, as well as 
[b] WindowsWGLGraphicsConfiguration choosing needs to be refined.

Better: Constrained to RGB555 and RGB888, w/ alpha optional.

Otherwise either WindowsBitmapWGLDrawable's GDI.CreateDIBSection fails [a]
or SetPixelFormat(..) fails [b].
Comment 1 Sven Gothel 2013-04-18 02:36:21 CEST
Refine Unit Tests ; UITestCase.Snapshot: Add RGBA bits to filename.

 -  Split TestGLAutoDrawableFactoryOffscrnCapsNEWT to
       TestGLAutoDrawableFactoryGL2OffscrnCapsNEWT and
 -  TestGLAutoDrawableFactoryGL2OffscrnCapsNEWT contains more 'Bitmap' tests of 
     various caps, w/ snapshots.                                                                                                            

Filter invalid PFD configs

 - Filter invalid PFD configs
   - WindowsBitmapWGLDrawable: Clip chosenCaps to RGBA888[0|8]
   - WindowsBitmapWGLDrawable: Only use BITMAPINFOHEADER.BiBitCount=24
   - WindowsWGLGraphicsConfiguration: Only allow GDI BITMAP PFD's w/ RGB888 w/ 
      alpha <= red, others may fail
 - WindowsWGLGraphicsConfigurationFactory.getAvailableGLCapabilities()
   - Fetch ARB caps w/o BITMAP
   - Concat GDI [BITMAP] caps
Comment 2 Sven Gothel 2013-04-18 09:08:26 CEST
Further restriction of Windows BITMAP PFD's - RGB888 and !alpha only

On Windows Vista machines, using alpha, i.e. RGB8888 failed to SetPixelFormat(..),
hence only allow RGB888.
Comment 3 Sven Gothel 2013-04-18 19:52:39 CEST

Exclude updateGraphicsConfigurationARB(..) usage for 
BITMAP (Windows Vista does report BITMAP w/ ARB PFD).

On Windows Vista machines, ARB PFD selection reports BITMAP which is attempted to be used.
Excluse updateGraphicsConfigurationARB(..) from BITMAP query, similar to getAvailableGLCapabilitiesARB()
from commit 61a47e07975eb2fd8b1f5f60552935c993a6eef6.



WindowsBitmapWGLDrawable: Requires GLProfile.GL2, fix BITMAP GLCaps ASAP at Ctor instead of setRealized(true); WindowsWGLContext: Exclude ARB creation for BITMAP

Unit Test TestGLAutoDrawableFactoryGLnBitmapCapsNEWT added using BITMAP on GLProfile.getDefault()
Comment 4 Sven Gothel 2013-04-18 20:52:07 CEST
https://jogamp.org/chuck/job/jogl/971/ shows good results on Vista and Win7