void setUseBlend(final boolean blend) { _useBlend = blend; if (!_useBlend) { blendState.setBlendEnabled(false); blendState.setReference(_blendDisabledTestRef); zBuffState.setWritable(true); } else { blendState.setBlendEnabled(true); blendState.setReference(_blendEnabledTestRef); zBuffState.setWritable(false); } } }
/** * Controls which stencil bitplanes are written for both faces. * * @param mask * The new stencil write mask for both faces. */ public void setStencilWriteMask(final int mask) { setStencilWriteMaskFront(mask); setStencilWriteMaskBack(mask); }
/** * Convienence method for setting both types of stencil masks at once for front faces. * * @param mask * The new stencil write and func mask for front faces. */ public void setStencilMaskFront(final int mask) { setStencilWriteMaskFront(mask); setStencilFuncMaskFront(mask); }
RenderStateSetter(final Texture texture, final boolean useBlend) { textureState = new TextureState(); textureState.setTexture(texture); blendState = new BlendState(); blendState.setSourceFunction(BlendState.SourceFunction.SourceAlpha); blendState.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha); blendState.setTestEnabled(true); blendState.setTestFunction(BlendState.TestFunction.GreaterThan); zBuffState = new ZBufferState(); zBuffState.setFunction(ZBufferState.TestFunction.LessThanOrEqualTo); setUseBlend(useBlend); }
/** * Convienence method for setting both types of stencil masks at once for back faces. * * @param mask * The new stencil write and func mask for back faces. */ public void setStencilMaskBack(final int mask) { setStencilWriteMaskBack(mask); setStencilFuncMaskBack(mask); }
/** * Set the contents for our vertex shader * * @param shader * the shader contents. */ public void setVertexShader(final ByteBuffer shader) { setVertexShader(shader, ""); }
/** * Set the contents for our fragment shader * * @param shader * the shader contents. */ public void setFragmentShader(final String shader) { setFragmentShader(shader, ""); }
/** * <code>setBlendEnabled</code> sets whether or not blending is enabled. * * @param value * true to enable the blending, false to disable it. */ public void setBlendEnabled(final boolean value) { _blendEnabled = value; setNeedsRefresh(true); }
/** * Sets the stencil reference to be used during the stencil function for back faces. * * @param reference * The new stencil reference for back faces. */ public void setStencilReferenceBack(final int reference) { _stencilReferenceBack = reference; setNeedsRefresh(true); }
/** * Sets if two sided lighting should be enabled for this LightState. Two sided lighting will cause the back of * surfaces to be colored using the inverse of the surface normal as well as the Material properties set for * MaterialFace.Back. * * @param twoSidedOn * If true, two sided lighting is enabled. */ public void setTwoSidedLighting(final boolean twoSidedOn) { this.twoSidedOn = twoSidedOn; setNeedsRefresh(true); }
/** * Sets the ambient color for front and back to the given value. * * @param ambient * the new ambient color */ public void setAmbient(final ReadOnlyColorRGBA ambient) { setAmbient(MaterialFace.FrontAndBack, ambient); }
/** * Sets the shininess value for front and back to the given value. * * @param shininess * the new shininess for this material. Must be between 0 and 128. Higher numbers result in "tighter" * specular reflections. */ public void setShininess(final float shininess) { setShininess(MaterialFace.FrontAndBack, shininess); }
/** * @param green * The green to set. */ public void setGreen(final boolean green) { this.green = green; setNeedsRefresh(true); }
/** * Set the contents for our vertex shader * * @param shader * the shader contents. * @param name * a label for this shader, displayer upon shader errors. */ public void setVertexShader(final String shader, final String name) { _vertShader = stringToByteBuffer(shader); _vertexShaderName = name; }
/** * <code>setEnd</code> sets the end distance, or the distance where fog is at it's thickest. * * @param end * the distance where the fog is the thickest. */ public void setEnd(final float end) { this.end = end; setNeedsRefresh(true); }
RenderStateSetter(final Texture texture, final boolean useBlend) { textureState = new TextureState(); textureState.setTexture(texture); blendState = new BlendState(); blendState.setSourceFunction(BlendState.SourceFunction.SourceAlpha); blendState.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha); blendState.setTestEnabled(true); blendState.setTestFunction(BlendState.TestFunction.GreaterThan); zBuffState = new ZBufferState(); zBuffState.setFunction(ZBufferState.TestFunction.LessThanOrEqualTo); setUseBlend(useBlend); }
void setUseBlend(final boolean blend) { _useBlend = blend; if (!_useBlend) { blendState.setBlendEnabled(false); blendState.setReference(_blendDisabledTestRef); zBuffState.setWritable(true); } else { blendState.setBlendEnabled(true); blendState.setReference(_blendEnabledTestRef); zBuffState.setWritable(false); } } }
/** * Set the contents for our geometry shader * * @param shader * the shader contents. * @param name * a label for this shader, displayer upon shader errors. */ public void setGeometryShader(final String shader, final String name) { _geomShader = stringToByteBuffer(shader); _geometryShaderName = name; }
/** * Set the contents for our tessellation evaluation shader * * @param shader * the shader contents. * @param name * a label for this shader, displayer upon shader errors. */ public void setTessellationEvaluationShader(final String shader, final String name) { _tessEvalShader = stringToByteBuffer(shader); _tessellationEvaluationShaderName = name; }
/** * Set the contents for our fragment shader * * @param shader * the shader contents. * @param name * a label for this shader, displayer upon shader errors. */ public void setFragmentShader(final String shader, final String name) { _fragShader = stringToByteBuffer(shader); _fragmentShaderName = name; }