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

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

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

Renderer.getProfilingTime介绍

[英]Returns the time in nano seconds elapsed for the task with the given id. Note that the result may not be available right after stopProfiling has been called. You need to check if the result is available with isTaskResultAvailable. Also note that it's guaranteed that the result will be available on next frame. If you use getProfilingTime on the next frame you called stopProfiling, you don't need to check the result availability with isTaskResultAvailable
[中]返回具有给定id的任务经过的时间(以纳秒为单位)。请注意,调用StopRofiling后,结果可能不可用。您需要检查isTaskResultAvailable是否提供了结果。还请注意,它保证结果将在下一帧中可用。如果在调用StopRofiling的下一帧中使用getProfilingTime,则无需使用isTaskResultAvailable检查结果可用性

代码示例

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

int id = i.next();
if (renderer.isTaskResultAvailable(id)) {
  long val = renderer.getProfilingTime(id);
  statLine.setValueGpu(val);
  i.remove();

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

int id = i.next();
if (renderer.isTaskResultAvailable(id)) {
  long val = renderer.getProfilingTime(id);
  statLine.setValueGpu(val);
  i.remove();

相关文章