mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
don't enable mipmapping if texture is the color buffer of a PGraphics
This commit is contained in:
@@ -82,6 +82,7 @@ public class Texture implements PConstants {
|
||||
protected PGraphicsOpenGL pg; // The main renderer
|
||||
protected PGL pgl; // The interface between Processing and OpenGL.
|
||||
protected PGL.Context context; // The context that created this texture.
|
||||
protected PGraphicsOpenGL pgDraw; // The main renderer is the color buffer of.
|
||||
|
||||
protected boolean usingMipmaps;
|
||||
protected boolean usingRepeat;
|
||||
@@ -135,6 +136,8 @@ public class Texture implements PConstants {
|
||||
pgl = pg.pgl;
|
||||
context = pgl.createEmptyContext();
|
||||
|
||||
pgDraw = null;
|
||||
|
||||
glName = 0;
|
||||
|
||||
init(width, height, (Parameters)params);
|
||||
@@ -1184,6 +1187,16 @@ public class Texture implements PConstants {
|
||||
}
|
||||
|
||||
|
||||
protected void colorBufferOf(PGraphicsOpenGL pgDraw) {
|
||||
this.pgDraw = pgDraw;
|
||||
}
|
||||
|
||||
|
||||
protected boolean isColorBuffer() {
|
||||
return pgDraw != null;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
// Utilities.
|
||||
|
||||
Reference in New Issue
Block a user