use debugview switch to enable depth test shader

This commit is contained in:
Hannes Janetzek 2013-01-12 13:39:14 +01:00
parent 2148e7564c
commit dcb6e11ee8
2 changed files with 8 additions and 7 deletions

View File

@ -609,7 +609,7 @@ public class GLRenderer implements GLSurfaceView.Renderer {
private boolean mNewSurface;
private static final boolean debugView = false;
public static final boolean debugView = false;
void clearBuffer() {
mNewSurface = true;

View File

@ -69,11 +69,13 @@ public final class PolygonRenderer {
static boolean init() {
// Set up the program for rendering polygons
// polygonProgram = GlUtils.createProgram(polygonVertexShaderZ,
// polygonFragmentShaderZ);
if (GLRenderer.debugView) {
polygonProgram = GlUtils.createProgram(polygonVertexShaderZ,
polygonFragmentShaderZ);
} else {
polygonProgram = GlUtils.createProgram(polygonVertexShader,
polygonFragmentShader);
}
if (polygonProgram == 0) {
// Log.e(TAG, "Could not create polygon program.");
return false;
@ -352,7 +354,6 @@ public final class PolygonRenderer {
+ "void main() {"
+ " gl_FragColor = u_color;"
+ "}";
private final static String polygonVertexShaderZ = ""
+ "precision highp float;"
+ "uniform mat4 u_mvp;"