From 2ce93668c57e29a6d2ea992f8675afdd0719c820 Mon Sep 17 00:00:00 2001 From: Chien Yang Date: Thu, 28 Oct 2004 21:22:10 +0000 Subject: 1) Fixed issue 77 : Scene antialiasing is disabled on Windows / OpenGL 2) For Win32-OGL : Apply similar technique, used in fix to 77, to Stereo, DoubleBuffer and Accum. 3) For Unix and Win32-OGL : Automat multisample density request in chooseFBConfig/ChoosePixelFormat if ARB_multisample is supported. It starts with sample density = 8 and move down if it can't find one. git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@63 ba19aa83-45c5-6ac9-afd3-db810772062c --- .../javax/media/j3d/NativeConfigTemplate3D.java | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/classes/linux') diff --git a/src/classes/linux/javax/media/j3d/NativeConfigTemplate3D.java b/src/classes/linux/javax/media/j3d/NativeConfigTemplate3D.java index 7e36e71..30cab7c 100644 --- a/src/classes/linux/javax/media/j3d/NativeConfigTemplate3D.java +++ b/src/classes/linux/javax/media/j3d/NativeConfigTemplate3D.java @@ -60,7 +60,7 @@ class NativeConfigTemplate3D { native boolean isStereoAvailable(long display, int screen, int vid); native boolean isDoubleBufferAvailable(long display, int screen, int vid); native boolean isSceneAntialiasingAccumAvailable(long display, int screen, int vid); - native boolean isSceneAntialiasingMultiSamplesAvailable(long display, int screen, int vid); + native boolean isSceneAntialiasingMultisampleAvailable(long display, int screen, int vid); /* @@ -201,7 +201,9 @@ class NativeConfigTemplate3D { // Return whether stereo is available. - boolean hasStereo(GraphicsConfiguration gc) { + boolean hasStereo(Canvas3D c3d) { + GraphicsConfiguration gc = c3d.graphicsConfiguration; + X11GraphicsDevice gd = (X11GraphicsDevice)((X11GraphicsConfig)gc).getDevice(); NativeScreenInfo nativeScreenInfo = new NativeScreenInfo(gd); @@ -214,7 +216,9 @@ class NativeConfigTemplate3D { } // Return whether a double buffer is available. - boolean hasDoubleBuffer(GraphicsConfiguration gc) { + boolean hasDoubleBuffer(Canvas3D c3d) { + GraphicsConfiguration gc = c3d.graphicsConfiguration; + X11GraphicsDevice gd = (X11GraphicsDevice)((X11GraphicsConfig)gc).getDevice(); NativeScreenInfo nativeScreenInfo = new NativeScreenInfo(gd); @@ -227,7 +231,9 @@ class NativeConfigTemplate3D { } // Return whether scene antialiasing is available. - boolean hasSceneAntialiasingAccum(GraphicsConfiguration gc) { + boolean hasSceneAntialiasingAccum(Canvas3D c3d) { + GraphicsConfiguration gc = c3d.graphicsConfiguration; + X11GraphicsDevice gd = (X11GraphicsDevice)((X11GraphicsConfig)gc).getDevice(); NativeScreenInfo nativeScreenInfo = new NativeScreenInfo(gd); @@ -241,7 +247,9 @@ class NativeConfigTemplate3D { // Return whether scene antialiasing is available. - boolean hasSceneAntialiasingMultiSamples(GraphicsConfiguration gc) { + boolean hasSceneAntialiasingMultisample(Canvas3D c3d) { + GraphicsConfiguration gc = c3d.graphicsConfiguration; + X11GraphicsDevice gd = (X11GraphicsDevice)((X11GraphicsConfig)gc).getDevice(); NativeScreenInfo nativeScreenInfo = new NativeScreenInfo(gd); @@ -250,7 +258,7 @@ class NativeConfigTemplate3D { int screen = nativeScreenInfo.getScreen(); int vid = ((X11GraphicsConfig)gc).getVisual(); - return isSceneAntialiasingMultiSamplesAvailable(display, screen, vid); + return isSceneAntialiasingMultisampleAvailable(display, screen, vid); } // Ensure that the native libraries are loaded -- cgit v1.2.3