disabled mipmapping on android, flush geometry when switching shaders

This commit is contained in:
codeanticode
2012-05-30 23:17:35 +00:00
parent 932b4e538a
commit cb94500418
6 changed files with 17 additions and 7 deletions

View File

@@ -5412,6 +5412,7 @@ public class PGraphicsOpenGL extends PGraphics {
public void setShader(PShader shader, int kind) {
flush(); // Flushing geometry with a different shader.
if (kind == FLAT_SHADER) {
polyFlatShader = (PolyFlatShader) shader;
} else if (kind == LIGHT_SHADER) {
@@ -5431,6 +5432,7 @@ public class PGraphicsOpenGL extends PGraphics {
public void defaultShader(int kind) {
flush(); // Flushing geometry with a different shader.
if (kind == FLAT_SHADER) {
if (defPolyFlatShader == null || defPolyFlatShader.contextIsOutdated()) {
defPolyFlatShader = new PolyFlatShader(parent, defPolyFlatShaderVertURL, defPolyNoTexShaderFragURL);