|
From: <eli...@us...> - 2004-02-15 15:34:18
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19325/src/java/org/lwjgl/opengl Modified Files: Window.java Log Message: Added GLX_ARB_multisample support Index: Window.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Window.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Window.java 8 Feb 2004 20:39:38 -0000 1.21 +++ Window.java 15 Feb 2004 15:27:00 -0000 1.22 @@ -79,21 +79,9 @@ /** Title of the window */ private static String title; - /** Color bits */ - private static int color; - - /** Alpha bits */ - private static int alpha; - - /** Depth bits */ - private static int depth; - - /** Stencil bits */ - private static int stencil; - /** Fullscreen */ private static boolean fullscreen; - + /** Vsync */ private static boolean vsync; @@ -244,23 +232,21 @@ * @param alpha Minimum bits per pixel in alpha buffer * @param depth Minimum bits per pixel in depth buffer * @param stencil Minimum bits per pixel in stencil buffer + * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). + Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. * @throws Exception if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ - public static void create(String title, int bpp, int alpha, int depth, int stencil) throws Exception { + public static void create(String title, int bpp, int alpha, int depth, int stencil, int samples) throws Exception { if (isCreated()) throw new Exception("Only one LWJGL window may be instantiated at any one time."); + Window.fullscreen = true; Window.x = 0; Window.y = 0; - Window.color = bpp; - Window.alpha = alpha; - Window.depth = depth; - Window.stencil = stencil; - Window.fullscreen = true; - Window.title = title; Window.width = Display.getWidth(); Window.height = Display.getHeight(); - createWindow(); + Window.title = title; + createWindow(bpp, alpha, depth, stencil, samples); } /** @@ -278,24 +264,22 @@ * @param alpha Minimum bits per pixel in alpha buffer * @param depth Minimum bits per pixel in depth buffer * @param stencil Minimum bits per pixel in stencil buffer + * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). + Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. * @throws Exception if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ - public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil) + public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil, int samples) throws Exception { if (isCreated()) throw new Exception("Only one LWJGL window may be instantiated at any one time."); + Window.fullscreen = false; Window.x = x; Window.y = y; Window.width = width; Window.height = height; - Window.color = bpp; - Window.alpha = alpha; - Window.depth = depth; - Window.stencil = stencil; - Window.fullscreen = false; Window.title = title; - createWindow(); + createWindow(bpp, alpha, depth, stencil, samples); } /** @@ -313,12 +297,13 @@ int alpha, int depth, int stencil, + int samples, HashSet extensions) throws Exception; - private static void createWindow() throws Exception { + private static void createWindow(int bpp, int alpha, int depth, int stencil, int samples) throws Exception { HashSet extensions = new HashSet(); - nCreate(title, x, y, width, height, fullscreen, color, alpha, depth, stencil, extensions); + nCreate(title, x, y, width, height, fullscreen, bpp, alpha, depth, stencil, samples, extensions); GLCaps.determineAvailableExtensions(extensions); context = new Window(); created = true; |