Vladimir Vernikovski wrote:
Hi, All !
Is there way to On/Off antialiasing after compile and load scene?
Now I have:
--------------------------------------------------------------------------------------------------------------------
GraphicsConfigTemplate3D gct3d = new GraphicsConfigTemplate3D();
gct3d.setSceneAntialiasing(GraphicsConfigTemplate3D.REQUIRED);
GraphicsConfiguration gc =
GraphicsEnvironment.getLocalGraphicsEnvironment().
getDefaultScreenDevice().
getBestConfiguration(gct3d);
if (gc == null)
System.exit(1);
System.out.println("Graphics Configuration initialization passed...");
canvas3d = new com.jproof.j3d.StableCanvas3D(gc);
u = new SimpleUniverse(canvas3d);
u.getViewer().getView().setSceneAntialiasingEnable(true);
---------------------------------------------------------------------------------------------------------------------
This work good. The antialiasing is ON.
But later the code
"u.getViewer().getView().setSceneAntialiasingEnable(false);" not
influence in scene look and antialiasing stay ON.
Can I do somethig or not?
Vladimir A. Vernikovski
Programmer
-------------------------------------------
JPROOF Technologies Ltd.
I think you're using DirectX version of Java3D, it set the attributes
D3DRS_MULTISAMPLEANTIALIAS
in DirectX 8.1 API to turn on/off antialiasing. However the driver may
not able to support it as mention
in the DirectX API spec. :
D3DRS_MULTISAMPLEANTIALIAS
---------------------------------------
" BOOL value that determines how individual samples are computed when
using a multisample render target buffer. When set to TRUE, the multiple
samples are computed so that full-scene antialiasing is performed by
sampling at different sample positions for each multiple sample. When
set to FALSE, the multiple samples are all written with the same sample
value?Xsampled at the pixel center, which allows non-antialiased
rendering to a multisample buffer. This render state has no effect when
rendering to a single sample buffer. The default value is TRUE.
Toggling this render state on and off in the same scene is not supported
if the D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE flag of the RasterCaps
member of the D3DCAPS8 structure is enabled. "
I won't be surprise if OpenGL version behave the same way due to driver
limitation.
Recreating the Canvas3D essentally create a new graphics context which
is the only way to
workaround if this happens.
- Kelvin
--------------
Java 3D Team
Sun Microsystems Inc.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".