/** * Returns a flag indicating whether or not the specified shading * language is supported. A ShaderError will be generated if an * unsupported shading language is used. * * @param shadingLanguage the shading language being queried, one of: * <code>Shader.SHADING_LANGUAGE_GLSL</code> or * <code>Shader.SHADING_LANGUAGE_CG</code>. * * @return true if the specified shading language is supported, * false otherwise. * * @since Java 3D 1.4 */ public boolean isShadingLanguageSupported(int shadingLanguage) { // Call queryProperties to ensure that the shading language flags are valid queryProperties(); if (shadingLanguage == Shader.SHADING_LANGUAGE_GLSL) return shadingLanguageGLSL; return false; }
/** * Returns a status flag indicating whether or not double * buffering is available. * This is equivalent to: * <ul> * <code> * ((Boolean)queryProperties(). * get("doubleBufferAvailable")). * booleanValue() * </code> * </ul> * * @return a flag indicating whether double buffering is available. */ public boolean getDoubleBufferAvailable() { return ((Boolean)queryProperties().get("doubleBufferAvailable")). booleanValue(); }
/** * Returns a status flag indicating whether or not stereo * is available. * This is equivalent to: * <ul> * <code> * ((Boolean)queryProperties(). * get("stereoAvailable")). * booleanValue() * </code> * </ul> * * @return a flag indicating whether stereo is available */ public boolean getStereoAvailable() { return ((Boolean)queryProperties().get("stereoAvailable")). booleanValue(); }
/** * Returns a status flag indicating whether or not scene * antialiasing is available. * This is equivalent to: * <ul> * <code> * ((Boolean)queryProperties(). * get("sceneAntialiasingAvailable")). * booleanValue() * </code> * </ul> * * @return a flag indicating whether scene antialiasing is available. */ public boolean getSceneAntialiasingAvailable() { return ((Boolean)queryProperties().get("sceneAntialiasingAvailable")). booleanValue(); }
public void j3dproperties() { final TextWindow tw = new TextWindow("Java 3D Properties", "Key\tValue", "", 512, 512); Map props = VirtualUniverse.getProperties(); tw.append("Java 3D properties\n \n"); for (final Iterator it = props.entrySet().iterator(); it.hasNext();) { final Map.Entry me = (Map.Entry) it.next(); tw.append(me.getKey() + "\t" + me.getValue()); } props = univ.getCanvas().queryProperties(); tw.append(" \nRendering properties\n \n"); for (final Iterator it = props.entrySet().iterator(); it.hasNext();) { final Map.Entry me = (Map.Entry) it.next(); tw.append(me.getKey() + "\t" + me.getValue()); } }
public void snapshot() { int w = univ.getCanvas().getWidth(); int h = univ.getCanvas().getHeight(); final GenericDialog gd = new GenericDialog("Snapshot", univ.getWindow()); gd.addNumericField("Target_width", w, 0); gd.addNumericField("Target_height", h, 0); gd.showDialog(); if (gd.wasCanceled()) return; w = (int) gd.getNextNumber(); h = (int) gd.getNextNumber(); final Map props = univ.getCanvas().queryProperties(); final int maxW = (Integer) props.get("textureWidthMax"); final int maxH = (Integer) props.get("textureHeightMax"); if (w < 0 || w >= maxW || h < 0 || h >= maxH) { IJ.error("Width must be between 0 and " + maxW + ",\nheight between 0 and " + maxH); return; } univ.takeSnapshot(w, h).show(); record(SNAPSHOT, Integer.toString(w), Integer.toString(h)); }