Browse Source

* 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

sha..rd 14 years ago
parent
commit
b3f9e87bf1

+ 4 - 1
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 rootNode = new Node("Root Node");
     protected Node guiNode = new Node("Gui Node");
     protected Node guiNode = new Node("Gui Node");
     protected float secondCounter = 0.0f;
     protected float secondCounter = 0.0f;
+    protected int frameCounter = 0;
     protected BitmapText fpsText;
     protected BitmapText fpsText;
     protected BitmapFont guiFont;
     protected BitmapFont guiFont;
     protected StatsView statsView;
     protected StatsView statsView;
@@ -241,10 +242,12 @@ public abstract class SimpleApplication extends Application {
 
 
         if (showFps) {
         if (showFps) {
             secondCounter += timer.getTimePerFrame();
             secondCounter += timer.getTimePerFrame();
-            int fps = (int) timer.getFrameRate();
+            frameCounter ++;
             if (secondCounter >= 1.0f) {
             if (secondCounter >= 1.0f) {
+                int fps = (int) (frameCounter / secondCounter);
                 fpsText.setText("Frames per second: " + fps);
                 fpsText.setText("Frames per second: " + fps);
                 secondCounter = 0.0f;
                 secondCounter = 0.0f;
+                frameCounter = 0;
             }          
             }          
         }
         }
 
 

+ 1 - 1
engine/src/core/com/jme3/app/package.html

@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <html>
 
 
 <head>
 <head>

+ 1 - 1
engine/src/core/com/jme3/effect/package.html

@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <html>
 
 
 <head>
 <head>

+ 5 - 1
engine/src/networking/com/jme3/network/base/package.html

@@ -1,5 +1,9 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>    
 <body>
 <body>
 The base package contains the default implementations for the
 The base package contains the default implementations for the
 {@link com.jme3.network.Client} and {@link com.jme3.network.Server} 
 {@link com.jme3.network.Client} and {@link com.jme3.network.Server} 

+ 7 - 1
engine/src/networking/com/jme3/network/kernel/package.html

@@ -1,5 +1,11 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <html>
+    
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>    
+    
 <body>
 <body>
 The kernel package is the heart of the JME networking module
 The kernel package is the heart of the JME networking module
 and controls the routing and dispatch of message data over
 and controls the routing and dispatch of message data over

+ 5 - 1
engine/src/networking/com/jme3/network/package.html

@@ -1,5 +1,9 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>    
 <body>
 <body>
 The network package contains the public API for the jME3 
 The network package contains the public API for the jME3 
 SpiderMonkey networking module.  The {@link com.jme3.network.Network}
 SpiderMonkey networking module.  The {@link com.jme3.network.Network}

+ 1 - 1
engine/src/ogre/com/jme3/scene/plugins/ogre/matext/package.html

@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <html>
 
 
 <head>
 <head>