void viewDidAppear() { // Apple re-disables GL_BLEND &c between our call to init() and the eventual call to this // method; why why why? I want my six hours spend on bullshit debugging back! gl.glDisable(GL_CULL_FACE); gl.glEnable(GL_BLEND); gl.glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); gl.glClearColor(0, 0, 0, 1); defaultFramebuffer = gl.glGetInteger(GL_FRAMEBUFFER_BINDING); }
@Override public boolean startClipped(int x, int y, int width, int height) { flush(); // flush any pending unclipped calls Rectangle r = pushScissorState(x, curFbufHeight - y - height, width, height); gl.glScissor(r.x, r.y, r.width, r.height); if (getScissorDepth() == 1) gl.glEnable(GL_SCISSOR_TEST); return !r.isEmpty(); }
public void init() { gl.glDisable(GL_CULL_FACE); gl.glEnable(GL_BLEND); gl.glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); gl.glClearColor(0, 0, 0, 1); if (quadShader != null) { quadShader.clearProgram(); } if (trisShader != null) { trisShader.clearProgram(); } quadShader = createQuadShader(); trisShader = new IndexedTrisShader(this); checkGLError("initGL"); }