Revision b329f352
Added by Leszek Koltunski over 9 years ago
| src/main/AndroidManifest.xml | ||
|---|---|---|
| 2 | 2 |
package="org.distorted.library" |
| 3 | 3 |
android:versionCode="1" |
| 4 | 4 |
android:versionName="1.0" > |
| 5 |
|
|
| 6 |
<uses-sdk |
|
| 7 |
android:minSdkVersion="10" |
|
| 8 |
android:targetSdkVersion="19" /> |
|
| 9 |
|
|
| 10 | 5 |
</manifest> |
| src/main/java/org/distorted/library/DistortedObject.java | ||
|---|---|---|
| 5 | 5 |
import android.opengl.GLUtils; |
| 6 | 6 |
|
| 7 | 7 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 8 |
|
|
| 8 |
/** |
|
| 9 |
* A abstract class. All Objects to which Distorted Graphics effects can be applied need to be extended from here. |
|
| 10 |
*/ |
|
| 9 | 11 |
public abstract class DistortedObject |
| 10 | 12 |
{
|
| 11 | 13 |
static final int TYPE_NUM = 3; |
| src/main/java/org/distorted/library/DistortedProjection.java | ||
|---|---|---|
| 3 | 3 |
import android.opengl.Matrix; |
| 4 | 4 |
|
| 5 | 5 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 6 |
|
|
| 7 |
public class DistortedProjection |
|
| 6 |
/** |
|
| 7 |
* Only used within the Distorted Library itself. |
|
| 8 |
*/ |
|
| 9 |
class DistortedProjection |
|
| 8 | 10 |
{
|
| 9 | 11 |
int width,height,depth,distance; |
| 10 | 12 |
float[] projectionMatrix; |
| ... | ... | |
| 14 | 16 |
// render to FBO we invert the texture upside down because its vertex coords |
| 15 | 17 |
// are purposefully set upside down in DistortedBackground; so each time we |
| 16 | 18 |
// render through FBO we need to invert it once more to counter this effect) |
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 19 | 20 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 20 | 21 |
|
| 21 | 22 |
public DistortedProjection(boolean inv) |
| src/main/java/org/distorted/library/EffectList.java | ||
|---|---|---|
| 4 | 4 |
|
| 5 | 5 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 6 | 6 |
|
| 7 |
public abstract class EffectList
|
|
| 7 |
abstract class EffectList
|
|
| 8 | 8 |
{
|
| 9 | 9 |
protected static final int DEFAULT_NUM_EFFECTS = 5; |
| 10 | 10 |
|
| ... | ... | |
| 84 | 84 |
|
| 85 | 85 |
void addListener(EffectListener el) |
| 86 | 86 |
{
|
| 87 |
if( mNumListeners==0 ) mListeners = new Vector<EffectListener>(2,2);
|
|
| 87 |
if( mNumListeners==0 ) mListeners = new Vector<>(2,2);
|
|
| 88 | 88 |
|
| 89 | 89 |
mListeners.add(el); |
| 90 | 90 |
mNumListeners++; |
| ... | ... | |
| 238 | 238 |
indexes[g] = -1; |
| 239 | 239 |
} |
| 240 | 240 |
|
| 241 |
String ret= new String(); |
|
| 242 |
ret = "(";
|
|
| 243 |
|
|
| 241 |
String ret="(";
|
|
| 244 | 242 |
int f; |
| 245 | 243 |
|
| 246 | 244 |
for(int g=0; g<max; g++) |
Also available in: Unified diff
Improvements for Javadoc