|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.rico.engine.util.FPSCounter
public class FPSCounter
This class can be used to calculate and display the framerate (frames per second)
| Constructor Summary | |
|---|---|
FPSCounter(int y,
int rightMargin)
Creates new frames per second counter. |
|
| Method Summary | |
|---|---|
void |
draw(javax.media.opengl.GL gl)
Draws the framerate to the upper left corner of the screen. |
java.lang.String |
toString()
|
void |
update(long elapsedTime)
Updates the frames per second counter to calculate the correct framerate. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FPSCounter(int y,
int rightMargin)
y - y coordinaterightMargin - distance from right screen margin| Method Detail |
|---|
public void update(long elapsedTime)
elapsedTime - time between two framespublic void draw(javax.media.opengl.GL gl)
gl - public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||