Project

General

Profile

« Previous | Next » 

Revision 5af2b7a9

Added by Leszek Koltunski over 2 years ago

Add info about FPS.

View differences:

src/main/java/org/distorted/config/ConfigRenderer.java
31 31
import javax.microedition.khronos.egl.EGLConfig;
32 32
import javax.microedition.khronos.opengles.GL10;
33 33

  
34
import static org.distorted.config.ConfigScreenPane.PADDING_RATIO;
35

  
34 36
///////////////////////////////////////////////////////////////////////////////////////////////////
35 37

  
36 38
public class ConfigRenderer implements GLSurfaceView.Renderer, DistortedLibrary.ExceptionListener
......
66 68
      {
67 69
      mScreen.resize(width,height);
68 70
      mView.setScreenSize(width,height);
71

  
72
      int debugWidth = (int)(0.2f*width);
73
      int debugHeight= (int)(0.5*debugWidth);
74
      int gap        = (int)(width*PADDING_RATIO);
75
      int textColor  = 0xffffffff;
76
      int backColor  = 0xff333333;
77

  
78
      mScreen.showFPS(debugWidth,debugHeight,gap,textColor,backColor);
69 79
      }
70 80

  
71 81
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff