Revision ef02f5e0
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/examples/generic/GenericRenderer.java | ||
---|---|---|
54 | 54 |
private static final float FOV = 30.0f; |
55 | 55 |
private static final float NEAR = 0.1f; |
56 | 56 |
|
57 |
private GLSurfaceView mView; |
|
58 |
private DistortedTexture mObjectTexture, mBackgroundTexture, mCenterTexture, mRegionTexture; |
|
59 |
private DistortedEffects mObjectEffects; |
|
60 |
private DistortedScreen mScreen; |
|
61 |
private DistortedNode mCenterNode, mRegionNode; |
|
62 |
private float mObjWidth, mObjHeight, mObjDepth; |
|
63 |
private Static3D mCenterPoint, mRegionPoint, mScaleRegion; |
|
64 |
private Static3D mMoveObject, mScaleObject, mScaleCenter, mMoveBackground, mScaleBackground; |
|
57 |
private final GLSurfaceView mView; |
|
58 |
private final DistortedTexture mObjectTexture, mBackgroundTexture, mCenterTexture, mRegionTexture; |
|
59 |
private final DistortedEffects mObjectEffects; |
|
60 |
private final DistortedScreen mScreen; |
|
61 |
private final DistortedNode mCenterNode, mRegionNode; |
|
62 |
private final Static3D mCenterPoint, mRegionPoint, mScaleRegion; |
|
63 |
private final Static3D mMoveObject, mScaleObject, mScaleCenter, mMoveBackground, mScaleBackground; |
|
64 |
private final float mObjWidth, mObjHeight, mObjDepth, mFactor; |
|
65 |
|
|
65 | 66 |
private boolean mShowingCenter=false; |
66 | 67 |
private boolean mShowingRegion=false; |
67 | 68 |
private float mFactorObj; |
68 | 69 |
private int mWidth; |
69 |
private float mFactor; |
|
70 | 70 |
|
71 | 71 |
Static4D mQuat1, mQuat2; |
72 | 72 |
int mScreenMin; |
... | ... | |
319 | 319 |
Effect.enableEffects(EffectType.FRAGMENT); |
320 | 320 |
Effect.enableEffects(EffectType.POSTPROCESS); |
321 | 321 |
|
322 |
DistortedLibrary.needTransformFeedback(); |
|
322 | 323 |
DistortedLibrary.onSurfaceCreated(mView.getContext(), this); |
323 | 324 |
} |
324 | 325 |
|
src/main/java/org/distorted/examples/meshfile/MeshFileRenderer.java | ||
---|---|---|
134 | 134 |
VertexEffectRotate.enable(); |
135 | 135 |
VertexEffectDeform.enable(); |
136 | 136 |
|
137 |
DistortedLibrary.needTransformFeedback(); |
|
137 | 138 |
DistortedLibrary.onSurfaceCreated(mView.getContext(), this); |
138 | 139 |
} |
139 | 140 |
|
src/main/java/org/distorted/examples/predeform/PredeformRenderer.java | ||
---|---|---|
48 | 48 |
private static final float FOV = 30.0f; |
49 | 49 |
private static final float NEAR = 0.1f; |
50 | 50 |
|
51 |
private GLSurfaceView mView; |
|
52 |
private DistortedTexture mTexture; |
|
53 |
private DistortedEffects mEffects1, mEffects2; |
|
54 |
private MeshBase mMesh1, mMesh2; |
|
55 |
private DistortedScreen mScreen; |
|
56 |
private Static3D mScale, mMove1, mMove2; |
|
51 |
private final GLSurfaceView mView;
|
|
52 |
private final DistortedTexture mTexture;
|
|
53 |
private final DistortedEffects mEffects1, mEffects2;
|
|
54 |
private final MeshBase mMesh1, mMesh2;
|
|
55 |
private final DistortedScreen mScreen;
|
|
56 |
private final Static3D mScale, mMove1, mMove2;
|
|
57 | 57 |
|
58 | 58 |
Static4D mQuat1, mQuat2; |
59 | 59 |
int mScreenMin; |
... | ... | |
180 | 180 |
|
181 | 181 |
Effect.enableEffects(EffectType.VERTEX); |
182 | 182 |
|
183 |
DistortedLibrary.needTransformFeedback(); |
|
183 | 184 |
DistortedLibrary.onSurfaceCreated(act, this); |
184 | 185 |
} |
185 | 186 |
|
Also available in: Unified diff
Bugfixes as a result of the Samsung Galaxy J4+ investigation:
1) By default, switch off transform feedback in the main program.
Create a new API 'needTransformFeedback()' to call if someone still needs TF in the main program.
2) lower the default max number of vertex effects to 30.
3) lower the default max number of Components of a Mesh to 100.