com.jme3.renderer.Renderer.stopProfiling()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(90)

本文整理了Java中com.jme3.renderer.Renderer.stopProfiling方法的一些代码示例,展示了Renderer.stopProfiling的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Renderer.stopProfiling方法的具体详情如下:
包路径:com.jme3.renderer.Renderer
类名称:Renderer
方法名:stopProfiling

Renderer.stopProfiling介绍

[英]Will stop the last profiling task started with startProfiling
[中]将停止以startProfiling开始的最后一个分析任务

代码示例

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

private void addStep(String path, long value) {
  if (ongoingGpuProfiling && renderer != null) {
    renderer.stopProfiling();
    ongoingGpuProfiling = false;
  }
  if (prevPath != null) {
    StatLine prevLine = data.get(prevPath);
    if (prevLine != null) {
      prevLine.setValueCpu(value - prevLine.getValueCpu());
    }
  }
  StatLine line = pool.get(path);
  if (line == null) {
    line = new StatLine(currentFrame);
    pool.put(path, line);
  }
  data.put(path, line);
  line.setNewFrameValueCpu(value);
  if (renderer != null) {
    int id = getUnusedTaskId();
    line.taskIds.add(id);
    renderer.startProfiling(id);
  }
  ongoingGpuProfiling = true;
  prevPath = path;
}

代码示例来源:origin: org.jmonkeyengine/jme3-core

private void addStep(String path, long value) {
  if (ongoingGpuProfiling && renderer != null) {
    renderer.stopProfiling();
    ongoingGpuProfiling = false;
  }
  if (prevPath != null) {
    StatLine prevLine = data.get(prevPath);
    if (prevLine != null) {
      prevLine.setValueCpu(value - prevLine.getValueCpu());
    }
  }
  StatLine line = pool.get(path);
  if (line == null) {
    line = new StatLine(currentFrame);
    pool.put(path, line);
  }
  data.put(path, line);
  line.setNewFrameValueCpu(value);
  if (renderer != null) {
    int id = getUnusedTaskId();
    line.taskIds.add(id);
    renderer.startProfiling(id);
  }
  ongoingGpuProfiling = true;
  prevPath = path;
}

相关文章