Revision b28c6c21
Added by Leszek Koltunski almost 7 years ago
src/main/java/org/distorted/library/Distorted.java | ||
---|---|---|
34 | 34 |
static int GLSL; |
35 | 35 |
static String GLSL_VERSION; |
36 | 36 |
|
37 |
//////////// DEBUG FLAGS ///////////////////////////////////////////// |
|
38 |
/** |
|
39 |
* When rendering a Screen, show FPS in the upper-left corner? |
|
40 |
*/ |
|
41 |
public static final int DEBUG_FPS = 1; |
|
42 |
|
|
43 |
//////////// END DEBUG FLAGS ///////////////////////////////////////// |
|
44 |
|
|
37 | 45 |
/** |
38 | 46 |
* When creating an instance of a DistortedTexture from another instance, clone the Bitmap that's |
39 | 47 |
* backing up our DistortedTexture. |
... | ... | |
76 | 84 |
|
77 | 85 |
private static boolean mInitialized=false; |
78 | 86 |
|
87 |
static int mDebugLevel = 0; |
|
88 |
static DistortedDebug mDebug; |
|
89 |
|
|
79 | 90 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
80 | 91 |
// private: hide this from Javadoc |
81 | 92 |
|
... | ... | |
91 | 102 |
return mInitialized; |
92 | 103 |
} |
93 | 104 |
|
105 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
106 |
/** |
|
107 |
* Make the library show various debugging information. |
|
108 |
* <p> |
|
109 |
* Currently only DEBUG_FPS - show FPS in the upper-left corner of every Screen - is defined. |
|
110 |
* |
|
111 |
* @param bitmask 0, or a bitmask of DEBUG_** flags to enable (currently only DEBUG_FPS defined) |
|
112 |
*/ |
|
113 |
public static void setDebug(int bitmask) |
|
114 |
{ |
|
115 |
mDebugLevel = bitmask; |
|
116 |
|
|
117 |
if( mDebugLevel!=0 && mDebug==null ) mDebug = new DistortedDebug(); |
|
118 |
} |
|
119 |
|
|
94 | 120 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
95 | 121 |
/** |
96 | 122 |
* When OpenGL context gets created, you need to call this method so that the library can initialise its internal data structures. |
Also available in: Unified diff
Move showing FPS in the uppoer-left corner of the Screen to the Library.
App can enable/disable this at any time with a single API call.