Revision 26c4e181
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/examples/sink/SinkRenderer.java | ||
---|---|---|
64 | 64 |
sink.add(new Static1D(0.2f)); |
65 | 65 |
|
66 | 66 |
mEffects = new DistortedEffects(); |
67 |
VertexEffectSink sinkEffect = new VertexEffectSink(sink, new Static3D(297, 280, 0), null);
|
|
67 |
VertexEffectSink sinkEffect = new VertexEffectSink(sink, new Static3D(0,0,0), null);
|
|
68 | 68 |
mEffects.apply(sinkEffect); |
69 | 69 |
|
70 | 70 |
mScale = new Static3D(1,1,1); |
... | ... | |
117 | 117 |
|
118 | 118 |
if( mTexture==null ) mTexture = new DistortedTexture(); |
119 | 119 |
mTexture.setTexture(bitmap); |
120 |
|
|
120 | 121 |
if( mMesh==null ) |
121 | 122 |
{ |
122 | 123 |
mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth); |
123 | 124 |
mMesh.setStretch(bmpWidth,bmpHeight,0); |
124 | 125 |
} |
125 | 126 |
|
126 |
|
|
127 | 127 |
mScreen.detachAll(); |
128 | 128 |
mScreen.attach(mTexture,mEffects,mMesh); |
129 | 129 |
|
Also available in: Unified diff
First fixes for moving the Vertex and Fragment centers of effect to the center of the Mesh.