From 0035fc564101e575b93418ca32744f50d30e27be Mon Sep 17 00:00:00 2001 From: benfry Date: Wed, 19 Apr 2006 01:06:47 +0000 Subject: [PATCH] fix basic depth sorting --- core/PGraphics3.java | 7 +++---- core/todo.txt | 8 +++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/core/PGraphics3.java b/core/PGraphics3.java index 2dfb263b1..fa4ef783c 100644 --- a/core/PGraphics3.java +++ b/core/PGraphics3.java @@ -1319,7 +1319,7 @@ public class PGraphics3 extends PGraphics { protected void depth_sort_triangles() { - depth_sort_triangles_internal(0, triangleCount); + depth_sort_triangles_internal(0, triangleCount-1); } @@ -1347,10 +1347,9 @@ public class PGraphics3 extends PGraphics { protected void depth_sort_triangles_swap(int a, int b) { - int temp[] = triangles[a]; + int tempi[] = triangles[a]; triangles[a] = triangles[b]; - triangles[b] = temp; - + triangles[b] = tempi; float tempf[][] = triangleColors[a]; triangleColors[a] = triangleColors[b]; triangleColors[b] = tempf; diff --git a/core/todo.txt b/core/todo.txt index ef443dc51..9405b6d88 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -4,11 +4,14 @@ X no need to use (..., null) anymore X fix set() for JAVA2D, also fixes background(PImage) for JAVA2D X http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1145108567 X remove "max texture size" debug message +X flicker with depth sort enabled -_ flicker with depth sort enabled _ endRaw() is a problem with hint(ENABLE_DEPTH_SORT) _ because the triangles won't be rendered by the time endRaw() is called -_ +_ need to merge sorting/drawing of lines and triangles +_ lines will occlude tris and vice versa +_ will need to split each based on the other +_ sort issues will affect both _ gray background in pdf (using both gl and p3d) _ http://dev.processing.org/bugs/show_bug.cgi?id=324 @@ -20,7 +23,6 @@ _ color values on camera input flipped on intel macs _ http://dev.processing.org/bugs/show_bug.cgi?id=313 _ polygon z-order with alpha in opengl _ add option to sort triangles back to front so alpha works -_ http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1076660476 _ at least add it to the faq, or this would be a test case w/ the sorting _ http://dev.processing.org/bugs/show_bug.cgi?id=176 _ http://www.opengl.org/resources/tutorials/advanced/advanced97/notes/node112.html