diff options
author | Sven Gothel <[email protected]> | 2010-12-16 04:18:15 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-12-16 04:18:15 +0100 |
commit | 96a0e0706258824c1dd524d4cbd7682a904b84f4 (patch) | |
tree | 48784cf9a3ac72b9faaf0f602fcb5210be493eee /src/nativewindow | |
parent | e38af7beda4edaa719240dda50df0a6611528586 (diff) |
Fix WGL Bitmap Offscreen Drawable
In conjunction with the gluegen investigation (gluegen: fbdedff789077b5ffa07811590f771b6f9a4f3a7),
on Windows the type LONG is always 32bit, hence we have to declare:
typedef __int32 LONG;
Besides, WGL_DRAW_TO_PBUFFER_ARB and WGL_DRAW_TO_BITMAP_ARB were missing in the
WGL/ARB attribute query, and the latter was not set in caps -> attributes.
Added fail safe exception for null chosen caps, if X11/WGL algo fails to determine.
Diffstat (limited to 'src/nativewindow')
-rw-r--r-- | src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsConfiguration.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsConfiguration.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsConfiguration.java index 47110add9..3a18b3a2a 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsConfiguration.java +++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsConfiguration.java @@ -39,8 +39,16 @@ public class DefaultGraphicsConfiguration implements Cloneable, AbstractGraphics public DefaultGraphicsConfiguration(AbstractGraphicsScreen screen, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested) { + if(null == screen) { + throw new NativeWindowException("Null screen"); + } + if(null == capsChosen) { + throw new NativeWindowException("Null chosen caps"); + } + if(null == capsRequested) { + throw new NativeWindowException("Null requested caps"); + } this.screen = screen; - this.capabilitiesChosen = capsChosen; this.capabilitiesRequested = capsRequested; } |