aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/share
diff options
context:
space:
mode:
authorChien Yang <[email protected]>2004-10-28 21:22:10 +0000
committerChien Yang <[email protected]>2004-10-28 21:22:10 +0000
commit2ce93668c57e29a6d2ea992f8675afdd0719c820 (patch)
treeb2a42e5956025c0da23bd716dd407c9f15b3baaa /src/classes/share
parentcc979689cf50222764a085f775dc39c583add82d (diff)
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
Diffstat (limited to 'src/classes/share')
-rw-r--r--src/classes/share/javax/media/j3d/Renderer.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/classes/share/javax/media/j3d/Renderer.java b/src/classes/share/javax/media/j3d/Renderer.java
index cd47249..fd560cd 100644
--- a/src/classes/share/javax/media/j3d/Renderer.java
+++ b/src/classes/share/javax/media/j3d/Renderer.java
@@ -380,7 +380,6 @@ class Renderer extends J3dThread {
Integer reqType = (Integer) m[nmesg].args[2];
Canvas3D c = (Canvas3D) secondArg;
if (reqType == MasterControl.SET_GRAPHICSCONFIG_FEATURES) {
- GraphicsConfiguration gc = c.graphicsConfiguration;
NativeConfigTemplate3D nct =
GraphicsConfigTemplate3D.nativeTemplate;
if (c.offScreen) {
@@ -389,16 +388,17 @@ class Renderer extends J3dThread {
c.doubleBufferAvailable = false;
c.stereoAvailable = false;
} else {
- c.doubleBufferAvailable = nct.hasDoubleBuffer(gc);
- c.stereoAvailable = nct.hasStereo(gc);
+ c.doubleBufferAvailable = nct.hasDoubleBuffer(c);
+ c.stereoAvailable = nct.hasStereo(c);
}
c.sceneAntialiasingMultiSamplesAvailable =
- nct.hasSceneAntialiasingMultiSamples(gc);
+ nct.hasSceneAntialiasingMultisample(c);
+
if (c.sceneAntialiasingMultiSamplesAvailable) {
c.sceneAntialiasingAvailable = true;
} else {
c.sceneAntialiasingAvailable =
- nct.hasSceneAntialiasingAccum(gc);
+ nct.hasSceneAntialiasingAccum(c);
}
GraphicsConfigTemplate3D.runMonitor(J3dThread.NOTIFY);
} else if (reqType == MasterControl.SET_QUERYPROPERTIES){
@@ -935,6 +935,7 @@ class Renderer extends J3dThread {
// full screen anti-aliasing setup
if (canvas.view.getSceneAntialiasingEnable() &&
canvas.sceneAntialiasingAvailable) {
+
if (!VirtualUniverse.mc.isD3D() &&
((canvas.extensionsSupported & Canvas3D.ARB_MULTISAMPLE) == 0) ||
!canvas.sceneAntialiasingMultiSamplesAvailable) {
@@ -981,13 +982,18 @@ class Renderer extends J3dThread {
}
}
} else {
+
if (!canvas.antialiasingSet) {
+ // System.out.println("Renderer : Enable FullSceneAntialiasing");
+
canvas.setFullSceneAntialiasing(canvas.ctx, true);
canvas.antialiasingSet = true;
}
}
} else {
+
if (canvas.antialiasingSet) {
+ // System.out.println("Renderer : Disable SceneAntialiasing");
canvas.setFullSceneAntialiasing(canvas.ctx, false);
canvas.antialiasingSet = false;
}