From b3f9e87bf1ced74b5033ea0e37c764620760c6bc Mon Sep 17 00:00:00 2001 From: "sha..rd" Date: Fri, 28 Oct 2011 00:49:07 +0000 Subject: [PATCH] * package.html files now comply with HTML 4.01 standards * SimpleApplication now computes FPS by counting frames instead of using Timer.getFrameRate() git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8534 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/app/SimpleApplication.java | 5 ++++- engine/src/core/com/jme3/app/package.html | 2 +- engine/src/core/com/jme3/effect/package.html | 2 +- engine/src/networking/com/jme3/network/base/package.html | 6 +++++- .../src/networking/com/jme3/network/kernel/package.html | 8 +++++++- engine/src/networking/com/jme3/network/package.html | 6 +++++- .../ogre/com/jme3/scene/plugins/ogre/matext/package.html | 2 +- 7 files changed, 24 insertions(+), 7 deletions(-) diff --git a/engine/src/core/com/jme3/app/SimpleApplication.java b/engine/src/core/com/jme3/app/SimpleApplication.java index 16a91cc92..ce4632e79 100644 --- a/engine/src/core/com/jme3/app/SimpleApplication.java +++ b/engine/src/core/com/jme3/app/SimpleApplication.java @@ -73,6 +73,7 @@ public abstract class SimpleApplication extends Application { protected Node rootNode = new Node("Root Node"); protected Node guiNode = new Node("Gui Node"); protected float secondCounter = 0.0f; + protected int frameCounter = 0; protected BitmapText fpsText; protected BitmapFont guiFont; protected StatsView statsView; @@ -241,10 +242,12 @@ public abstract class SimpleApplication extends Application { if (showFps) { secondCounter += timer.getTimePerFrame(); - int fps = (int) timer.getFrameRate(); + frameCounter ++; if (secondCounter >= 1.0f) { + int fps = (int) (frameCounter / secondCounter); fpsText.setText("Frames per second: " + fps); secondCounter = 0.0f; + frameCounter = 0; } } diff --git a/engine/src/core/com/jme3/app/package.html b/engine/src/core/com/jme3/app/package.html index 472ef6142..ec6bb9a89 100644 --- a/engine/src/core/com/jme3/app/package.html +++ b/engine/src/core/com/jme3/app/package.html @@ -1,4 +1,4 @@ - + diff --git a/engine/src/core/com/jme3/effect/package.html b/engine/src/core/com/jme3/effect/package.html index eecc0b6bb..dd16da7af 100644 --- a/engine/src/core/com/jme3/effect/package.html +++ b/engine/src/core/com/jme3/effect/package.html @@ -1,4 +1,4 @@ - + diff --git a/engine/src/networking/com/jme3/network/base/package.html b/engine/src/networking/com/jme3/network/base/package.html index cf08401ce..a00cb16aa 100644 --- a/engine/src/networking/com/jme3/network/base/package.html +++ b/engine/src/networking/com/jme3/network/base/package.html @@ -1,5 +1,9 @@ - + + + + + The base package contains the default implementations for the {@link com.jme3.network.Client} and {@link com.jme3.network.Server} diff --git a/engine/src/networking/com/jme3/network/kernel/package.html b/engine/src/networking/com/jme3/network/kernel/package.html index 0e59c725c..7029c958f 100644 --- a/engine/src/networking/com/jme3/network/kernel/package.html +++ b/engine/src/networking/com/jme3/network/kernel/package.html @@ -1,5 +1,11 @@ - + + + + + + + The kernel package is the heart of the JME networking module and controls the routing and dispatch of message data over diff --git a/engine/src/networking/com/jme3/network/package.html b/engine/src/networking/com/jme3/network/package.html index ffb0138cf..46dfa80c1 100644 --- a/engine/src/networking/com/jme3/network/package.html +++ b/engine/src/networking/com/jme3/network/package.html @@ -1,5 +1,9 @@ - + + + + + The network package contains the public API for the jME3 SpiderMonkey networking module. The {@link com.jme3.network.Network} diff --git a/engine/src/ogre/com/jme3/scene/plugins/ogre/matext/package.html b/engine/src/ogre/com/jme3/scene/plugins/ogre/matext/package.html index 22dcf5e66..0b2725cc0 100644 --- a/engine/src/ogre/com/jme3/scene/plugins/ogre/matext/package.html +++ b/engine/src/ogre/com/jme3/scene/plugins/ogre/matext/package.html @@ -1,4 +1,4 @@ - +