mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Making sure that a PImage always has a non-null parent when adding a texture
This commit is contained in:
@@ -40,9 +40,6 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.Stack;
|
||||
|
||||
// TODO:
|
||||
// 2) non-interactive mode problem?
|
||||
|
||||
/**
|
||||
* OpenGL renderer.
|
||||
*
|
||||
@@ -4943,6 +4940,9 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
params = PTexture.newParameters();
|
||||
img.setParams(pg, params);
|
||||
}
|
||||
if (img.parent == null) {
|
||||
img.parent = parent;
|
||||
}
|
||||
PTexture tex = new PTexture(img.parent, img.width, img.height, params);
|
||||
img.loadPixels();
|
||||
if (img.pixels != null) tex.set(img.pixels);
|
||||
@@ -6827,6 +6827,14 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
}
|
||||
}
|
||||
|
||||
void addPoint() {
|
||||
|
||||
}
|
||||
|
||||
void addLine() {
|
||||
|
||||
}
|
||||
|
||||
void addEllipse(int ellipseMode, float a, float b, float c, float d,
|
||||
boolean fill, int fillColor,
|
||||
boolean stroke, int strokeColor, float strokeWeight,
|
||||
|
||||
Reference in New Issue
Block a user