Revision bd3da5b2
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/Distorted.java | ||
---|---|---|
91 | 91 |
static int mTextureCoordH; // pass in model texture coordinate information. |
92 | 92 |
static int mProgramH; // This is a handle to our shading program. |
93 | 93 |
|
94 |
static DistortedProjection mProjection = new DistortedProjection(); |
|
95 |
static float mFOV = 60.0f; |
|
96 |
|
|
94 |
static DistortedRenderTarget mRenderTarget = new DistortedRenderTarget(0); |
|
95 |
|
|
97 | 96 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
98 | 97 |
|
99 | 98 |
private Distorted() |
... | ... | |
293 | 292 |
*/ |
294 | 293 |
public static void setFov(float fov) |
295 | 294 |
{ |
296 |
mFOV = fov; |
|
297 |
|
|
298 |
if( mProjection.width>0 && mProjection.height>0 ) |
|
299 |
mProjection.onSurfaceChanged( mProjection.width, mProjection.height); |
|
295 |
mRenderTarget.setProjection(fov,0.0f,0.0f); |
|
300 | 296 |
} |
301 | 297 |
|
302 | 298 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
366 | 362 |
*/ |
367 | 363 |
public static void onSurfaceChanged(int surfaceWidth, int surfaceHeight) |
368 | 364 |
{ |
369 |
mProjection.onSurfaceChanged(surfaceWidth, surfaceHeight);
|
|
365 |
mRenderTarget.resize(surfaceWidth,surfaceHeight);
|
|
370 | 366 |
} |
371 | 367 |
|
372 | 368 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Move DistortedNode and Distorted to use the new DistortedRenderTarget.