mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 18:35:37 +01:00
continues the removal of static references
This commit is contained in:
@@ -63,11 +63,12 @@ class FontTexture implements PConstants {
|
||||
protected TextureInfo[] glyphTexinfos;
|
||||
protected HashMap<PFont.Glyph, TextureInfo> texinfoMap;
|
||||
|
||||
public FontTexture(PFont font, boolean is3D) {
|
||||
pgl = PGraphicsOpenGL.pgPrimary.pgl;
|
||||
|
||||
public FontTexture(PGraphicsOpenGL pg, PFont font, boolean is3D) {
|
||||
pgl = pg.pgl;
|
||||
this.is3D = is3D;
|
||||
|
||||
initTexture(PGraphicsOpenGL.pgPrimary, font);
|
||||
initTexture(pg, font);
|
||||
}
|
||||
|
||||
|
||||
@@ -130,15 +131,15 @@ class FontTexture implements PConstants {
|
||||
if (is3D) {
|
||||
// Bilinear sampling ensures that the texture doesn't look pixelated
|
||||
// either when it is magnified or minified...
|
||||
tex = new Texture(w, h, new Texture.Parameters(ARGB, Texture.BILINEAR,
|
||||
false));
|
||||
tex = new Texture(pg, w, h,
|
||||
new Texture.Parameters(ARGB, Texture.BILINEAR, false));
|
||||
} else {
|
||||
// ...however, the effect of bilinear sampling is to add some blurriness
|
||||
// to the text in its original size. In 2D, we assume that text will be
|
||||
// shown at its original size, so linear sampling is chosen instead (which
|
||||
// only affects minimized text).
|
||||
tex = new Texture(w, h, new Texture.Parameters(ARGB, Texture.LINEAR,
|
||||
false));
|
||||
tex = new Texture(pg, w, h,
|
||||
new Texture.Parameters(ARGB, Texture.LINEAR, false));
|
||||
}
|
||||
|
||||
if (textures == null) {
|
||||
|
||||
Reference in New Issue
Block a user