Revision a436ccc5
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/library/DistortedScreen.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
package org.distorted.library; |
21 | 21 |
|
22 |
import android.opengl.GLES30; |
|
23 |
|
|
24 | 22 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
25 | 23 |
/** |
26 | 24 |
* Class which represents the Screen. |
... | ... | |
32 | 30 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
33 | 31 |
// here we don't manage underlying OpenGL assets ourselves |
34 | 32 |
|
35 |
void create() {} |
|
36 |
void delete() {} |
|
33 |
void create() {}
|
|
34 |
void delete() {}
|
|
37 | 35 |
void recreate() {} |
38 | 36 |
|
39 | 37 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
46 | 44 |
*/ |
47 | 45 |
public DistortedScreen() |
48 | 46 |
{ |
49 |
super(0,0,DONT_CREATE,false); |
|
50 |
} |
|
51 |
|
|
52 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
53 |
/** |
|
54 |
* Bind this Surface as a Framebuffer we can render to. |
|
55 |
*/ |
|
56 |
public void setAsOutput() |
|
57 |
{ |
|
58 |
GLES30.glBindFramebuffer(GLES30.GL_FRAMEBUFFER, 0); |
|
59 |
GLES30.glEnable(GLES30.GL_DEPTH_TEST); |
|
60 |
GLES30.glDepthMask(true); |
|
47 |
super(0,0,DONT_CREATE,0,false,true); |
|
61 | 48 |
} |
62 | 49 |
} |
Also available in: Unified diff
1. Make it possible to enable/disable DEPTH test when rendering to a Screen
2. Using this, remove the 'Root' Node from StarWars.