image() doesn't work with P2D, P3D, and OPENGL with noFill() (bug #1299)

This commit is contained in:
benfry
2009-07-31 17:53:50 +00:00
parent 63479116b7
commit 8e189ebb83
4 changed files with 15 additions and 9 deletions
+6 -6
View File
@@ -283,7 +283,7 @@ public class PGraphics2D extends PGraphics {
case TRIANGLE_FAN:
// do fill and stroke separately because otherwise
// the lines will be stroked more than necessary
if (fill) {
if (fill || textureImage != null) {
fpolygon.vertexCount = 3;
for (int i = 1; i < vertexCount-1; i++) {
@@ -342,7 +342,7 @@ public class PGraphics2D extends PGraphics {
increment = (shape == TRIANGLES) ? 3 : 1;
// do fill and stroke separately because otherwise
// the lines will be stroked more than necessary
if (fill) {
if (fill || textureImage != null) {
fpolygon.vertexCount = 3;
for (int i = 0; i < vertexCount-2; i += increment) {
for (int j = 0; j < 3; j++) {
@@ -379,7 +379,7 @@ public class PGraphics2D extends PGraphics {
break;
case QUADS:
if (fill) {
if (fill || textureImage != null) {
fpolygon.vertexCount = 4;
for (int i = 0; i < vertexCount-3; i += 4) {
for (int j = 0; j < 4; j++) {
@@ -412,7 +412,7 @@ public class PGraphics2D extends PGraphics {
break;
case QUAD_STRIP:
if (fill) {
if (fill || textureImage != null) {
fpolygon.vertexCount = 4;
for (int i = 0; i < vertexCount-3; i += 2) {
for (int j = 0; j < 4; j++) {
@@ -445,7 +445,7 @@ public class PGraphics2D extends PGraphics {
case POLYGON:
if (isConvex()) {
if (fill) {
if (fill || textureImage != null) {
//System.out.println("convex");
fpolygon.renderPolygon(vertices, vertexCount);
//if (stroke) polygon.unexpand();
@@ -463,7 +463,7 @@ public class PGraphics2D extends PGraphics {
}
} else { // not convex
//System.out.println("concave");
if (fill) {
if (fill || textureImage != null) {
// the triangulator produces polygons that don't align
// when smoothing is enabled. but if there is a stroke around
// the polygon, then smoothing can be temporarily disabled.
+2 -2
View File
@@ -608,7 +608,7 @@ public class PGraphics3D extends PGraphics {
endShapeStroke(mode);
}
if (fill) {
if (fill || textureImage != null) {
endShapeFill();
}
@@ -622,7 +622,7 @@ public class PGraphics3D extends PGraphics {
// render shape and fill here if not saving the shapes for later
// if true, the shapes will be rendered on endDraw
if (!hints[ENABLE_DEPTH_SORT]) {
if (fill) {
if (fill || textureImage != null) {
if (triangleCount > 0) {
renderTriangles(0, triangleCount);
if (raw != null) {
+1 -1
View File
@@ -419,7 +419,7 @@ public class PPolygon implements PConstants {
int tr, tg, tb, ta;
// System.out.println("P2D interp uv " + interpUV + " " +
// vertices[2][U] + " " + vertices[2][V]);
// vertices[2][U] + " " + vertices[2][V]);
for (int x = lx; x <= rx; x++) {
// map texture based on U, V coords in sp[U] and sp[V]
if (interpUV) {
+6
View File
@@ -4,6 +4,12 @@ X http://dev.processing.org/bugs/show_bug.cgi?id=1282
X strokeWeight() makes lines 2x too thick with P2D
X http://dev.processing.org/bugs/show_bug.cgi?id=1283
_ image() doesn't work with P2D and P3D if noFill() is in use
_ maybe using rgb instead of tint inside drawing loops?
_ file chooser fails with opengl on linux
_ http://dev.processing.org/bugs/show_bug.cgi?id=1221
_ resizing opengl destroys context and textures
_ http://dev.processing.org/bugs/show_bug.cgi?id=1176
_ what's the difference with ascent on loadFont vs. createFont?