Java Code Examples for com.jme3.renderer.queue.RenderQueue#Bucket

The following examples show how to use com.jme3.renderer.queue.RenderQueue#Bucket . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DetailedProfiler.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Override
public void vpStep(VpStep step, ViewPort vp, RenderQueue.Bucket bucket) {

    if (data != null) {
        vpPath.setLength(0);
        vpPath.append(vp.getName()).append("/").append((bucket == null ? step.name() : bucket.name() + " Bucket"));
        path.setLength(0);
        if ((lastVpStep == VpStep.PostQueue || lastVpStep == VpStep.PostFrame) && bucket != null) {
            path.append(curAppPath).append("/").append(curVpPath).append(curSpPath).append("/").append(vpPath);
            curVpPath = vpPath.toString();
        } else {
            if (bucket != null) {
                path.append(curAppPath).append("/").append(curVpPath).append("/").append(bucket.name() + " Bucket");
            } else {
                path.append(curAppPath).append("/").append(vpPath);
                curVpPath = vpPath.toString();
            }
        }
        lastVpStep = step;

        addStep(path.toString(), System.nanoTime());
    }
}
 
Example 2
Source File: BaseMaterialFileEditor.java    From jmonkeybuilder with Apache License 2.0 5 votes vote down vote up
/**
 * Handle changing the bucket type.
 */
@FxThread
private void changeBucketType(@NotNull final RenderQueue.Bucket newValue) {

    final T editor3DState = getEditor3DPart();
    editor3DState.changeBucketType(newValue);

    final EditorMaterialEditorState editorState = getEditorState();
    if (editorState != null) editorState.setBucketType(newValue);
}
 
Example 3
Source File: EditorMaterialEditorState.java    From jmonkeybuilder with Apache License 2.0 5 votes vote down vote up
/**
 * Sets bucket type.
 *
 * @param bucketType the bucket type.
 */
@FxThread
public void setBucketType(@NotNull final RenderQueue.Bucket bucketType) {
    final boolean changed = getBucketTypeId() != bucketType.ordinal();
    this.bucketTypeId = bucketType.ordinal();
    final Runnable changeHandler = getChangeHandler();
    if (changed && changeHandler != null) {
        changeHandler.run();
    }
}
 
Example 4
Source File: Spatial.java    From jmonkeybuilder with Apache License 2.0 5 votes vote down vote up
/**
 * Returns this spatial's renderqueue bucket. If the mode is set to inherit,
 * then the spatial gets its renderqueue bucket from its parent.
 *
 * @return The spatial's current renderqueue mode.
 */
public RenderQueue.Bucket getQueueBucket() {
    if (queueBucket != RenderQueue.Bucket.Inherit) {
        return queueBucket;
    } else if (parent != null) {
        return parent.getQueueBucket();
    } else {
        return RenderQueue.Bucket.Opaque;
    }
}
 
Example 5
Source File: Spatial.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Returns this spatial's renderqueue bucket. If the mode is set to inherit,
 * then the spatial gets its renderqueue bucket from its parent.
 *
 * @return The spatial's current renderqueue mode.
 */
public RenderQueue.Bucket getQueueBucket() {
    if (queueBucket != RenderQueue.Bucket.Inherit) {
        return queueBucket;
    } else if (parent != null) {
        return parent.getQueueBucket();
    } else {
        return RenderQueue.Bucket.Opaque;
    }
}
 
Example 6
Source File: Spatial.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
/**
 * Returns this spatial's renderqueue bucket. If the mode is set to inherit,
 * then the spatial gets its renderqueue bucket from its parent.
 *
 * @return The spatial's current renderqueue mode.
 */
public RenderQueue.Bucket getQueueBucket() {
    if (queueBucket != RenderQueue.Bucket.Inherit) {
        return queueBucket;
    } else if (parent != null) {
        return parent.getQueueBucket();
    } else {
        return RenderQueue.Bucket.Opaque;
    }
}
 
Example 7
Source File: BaseMaterialFileEditor.java    From jmonkeybuilder with Apache License 2.0 4 votes vote down vote up
/**
 * @return the list of RenderQueue.Bucket.
 */
@FromAnyThread
private @NotNull ComboBox<RenderQueue.Bucket> getBucketComboBox() {
    return notNull(bucketComboBox);
}
 
Example 8
Source File: EditorMaterialEditorState.java    From jmonkeybuilder with Apache License 2.0 2 votes vote down vote up
/**
 * Gets bucket type.
 *
 * @return the bucket type.
 */
@FxThread
public @NotNull RenderQueue.Bucket getBucketType() {
    return BUCKETS[bucketTypeId];
}
 
Example 9
Source File: Spatial.java    From jmonkeybuilder with Apache License 2.0 2 votes vote down vote up
/**
 * <code>setQueueBucket</code> determines at what phase of the
 * rendering process this Spatial will rendered. See the
 * {@link Bucket} enum for an explanation of the various
 * render queue buckets.
 *
 * @param queueBucket
 *            The bucket to use for this Spatial.
 */
public void setQueueBucket(RenderQueue.Bucket queueBucket) {
    this.queueBucket = queueBucket;
}
 
Example 10
Source File: Spatial.java    From jmonkeybuilder with Apache License 2.0 2 votes vote down vote up
/**
 * @return The locally set queue bucket mode
 *
 * @see Spatial#setQueueBucket(com.jme3.renderer.queue.RenderQueue.Bucket)
 */
public RenderQueue.Bucket getLocalQueueBucket() {
    return queueBucket;
}
 
Example 11
Source File: TestShaderNodesStress.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 2 votes vote down vote up
@Override
public void vpStep(VpStep step, ViewPort vp, RenderQueue.Bucket bucket) {

}
 
Example 12
Source File: Spatial.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 2 votes vote down vote up
/**
 * <code>setQueueBucket</code> determines at what phase of the
 * rendering process this Spatial will rendered. See the
 * {@link Bucket} enum for an explanation of the various
 * render queue buckets.
 *
 * @param queueBucket
 *            The bucket to use for this Spatial.
 */
public void setQueueBucket(RenderQueue.Bucket queueBucket) {
    this.queueBucket = queueBucket;
}
 
Example 13
Source File: Spatial.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 2 votes vote down vote up
/**
 * @return The locally set queue bucket mode
 *
 * @see Spatial#setQueueBucket(com.jme3.renderer.queue.RenderQueue.Bucket)
 */
public RenderQueue.Bucket getLocalQueueBucket() {
    return queueBucket;
}
 
Example 14
Source File: Spatial.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 2 votes vote down vote up
/**
 * <code>setQueueBucket</code> determines at what phase of the
 * rendering process this Spatial will rendered. See the
 * {@link Bucket} enum for an explanation of the various 
 * render queue buckets.
 * 
 * @param queueBucket
 *            The bucket to use for this Spatial.
 */
public void setQueueBucket(RenderQueue.Bucket queueBucket) {
    this.queueBucket = queueBucket;
}
 
Example 15
Source File: Spatial.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 2 votes vote down vote up
/**
 * @return The locally set queue bucket mode
 *
 * @see Spatial#setQueueBucket(com.jme3.renderer.queue.RenderQueue.Bucket)
 */
public RenderQueue.Bucket getLocalQueueBucket() {
    return queueBucket;
}