mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Changed blend for modulate mode in A3D text rendering
This commit is contained in:
@@ -699,7 +699,7 @@ public class PFont implements PConstants {
|
||||
|
||||
// This is the right texture environment mode to use the current fill color to tint the fonts:
|
||||
// http://www.khronos.org/opengles/documentation/opengles1_0/html/glTexEnv.html
|
||||
gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, GL10.GL_BLEND);
|
||||
gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, GL10.GL_MODULATE);
|
||||
|
||||
gl.glTexImage2D(GL10.GL_TEXTURE_2D, 0, GL10.GL_RGBA, texWidth, texHeight, 0, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, null);
|
||||
gl.glBindTexture(GL10.GL_TEXTURE_2D, 0);
|
||||
|
||||
@@ -2278,8 +2278,8 @@ public class PGraphicsAndroid3D extends PGraphics {
|
||||
gl.glPushMatrix();
|
||||
gl.glLoadIdentity();
|
||||
|
||||
// Setting the current fill color as the environment color to multiply the texture color of the font.
|
||||
gl.glTexEnvfv(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_COLOR, colorFloats, 0);
|
||||
// Setting the current fill color as the font color.
|
||||
gl.glColor4f(colorFloats[0], colorFloats[1], colorFloats[2], colorFloats[3]);
|
||||
|
||||
super.textLineImpl(buffer, start, stop, x, y);
|
||||
|
||||
@@ -2310,8 +2310,7 @@ public class PGraphicsAndroid3D extends PGraphics {
|
||||
float x2 = x1 + bwidth * textSize;
|
||||
float y2 = y1 + high * textSize;
|
||||
|
||||
textCharModelImpl(glyph.texture,
|
||||
x1, y1, x2, y2);
|
||||
textCharModelImpl(glyph.texture, x1, y1, x2, y2);
|
||||
|
||||
} else if (textMode == SCREEN) {
|
||||
int xx = (int) x + glyph.leftExtent;
|
||||
|
||||
Reference in New Issue
Block a user