Revision 1bbe1af2
Added by Leszek Koltunski over 8 years ago
| src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java | ||
|---|---|---|
| 234 | 234 |
float factorBackY = ((float)height)/backgroundSize; |
| 235 | 235 |
|
| 236 | 236 |
// quite tricky: move the background exactly to the FAR plane! (see DistortedOutputSurface.setProjection() ) |
| 237 |
mBackgroundEffects.move(new Static3D( -width/2, -height/2, -height*(1.0f-NEAR)/(2.0f*(float)Math.tan(FOV*Math.PI/360))) ); |
|
| 237 |
mBackgroundEffects.move(new Static3D( -width/2, -height/2, -0.9f*height*(1.0f-NEAR)/(2.0f*(float)Math.tan(FOV*Math.PI/360))) );
|
|
| 238 | 238 |
mBackgroundEffects.scale(new Static3D(2*factorBackX, 2*factorBackY, 1.0f) ); |
| 239 | 239 |
|
| 240 | 240 |
mScreen.resize(width, height); |
| src/main/res/layout/effects3dlayout.xml | ||
|---|---|---|
| 69 | 69 |
|
| 70 | 70 |
<Spinner |
| 71 | 71 |
android:id="@+id/effects3dspinner" |
| 72 |
android:layout_width="wrap_content"
|
|
| 72 |
android:layout_width="0dp"
|
|
| 73 | 73 |
android:layout_height="wrap_content" |
| 74 | 74 |
android:layout_weight="0.5"/> |
| 75 | 75 |
|
| ... | ... | |
| 93 | 93 |
android:id="@+id/effects3dscrollView" |
| 94 | 94 |
android:layout_width="match_parent" |
| 95 | 95 |
android:layout_height="0dp" |
| 96 |
android:layout_weight="0.82"
|
|
| 96 |
android:layout_weight="0.80"
|
|
| 97 | 97 |
> |
| 98 | 98 |
|
| 99 | 99 |
<LinearLayout |
Also available in: Unified diff
Some corrections so that most apps still work on the Android emulator (OpenGL ES 2.0-based)