|
From: Elias N. <eli...@us...> - 2005-12-29 22:30:29
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13935/src/java/org/lwjgl/opengl Modified Files: AWTGLCanvas.java Display.java Pbuffer.java Log Message: Make Display, Pbuffer and AWTGLCanvas fail on null PixelFormats Index: Pbuffer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- Pbuffer.java 20 Jul 2005 07:30:26 -0000 1.42 +++ Pbuffer.java 29 Dec 2005 22:30:14 -0000 1.43 @@ -178,6 +178,8 @@ * with the Display context (if created). */ public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture, Drawable shared_drawable) throws LWJGLException { + if (pixel_format == null) + throw new NullPointerException("Pixel format must be non-null"); this.width = width; this.height = height; this.peer_info = createPbuffer(width, height, pixel_format, renderTexture); Index: AWTGLCanvas.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- AWTGLCanvas.java 28 Dec 2005 22:23:35 -0000 1.15 +++ AWTGLCanvas.java 29 Dec 2005 22:30:13 -0000 1.16 @@ -147,6 +147,8 @@ */ public AWTGLCanvas(GraphicsDevice device, PixelFormat pixel_format, Drawable drawable) throws LWJGLException { super(implementation.findConfiguration(device, pixel_format)); + if (pixel_format == null) + throw new NullPointerException("Pixel format must be non-null"); addHierarchyListener(this); this.drawable = drawable; this.pixel_format = pixel_format; Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Display.java,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- Display.java 21 Oct 2005 18:53:21 -0000 1.56 +++ Display.java 29 Dec 2005 22:30:14 -0000 1.57 @@ -646,6 +646,8 @@ * @throws LWJGLException */ public static void create(PixelFormat pixel_format, Drawable shared_drawable) throws LWJGLException { + if (pixel_format == null) + throw new NullPointerException("Pixel format must be non-null"); if (isCreated()) throw new IllegalStateException("Only one LWJGL context may be instantiated at any one time."); if (pixel_format == null) |