Commits

Cliff Biffle committed e7ca092

Fixed an oversight in the depth field rendering routines: loop index bounds assumed that we were looking at pairs of points.

  • Participants
  • Parent commits 46a17c7

Comments (0)

Files changed (1)

File KVDepthView.m

   const uint16_t *depths = [rawDepthField bytes];
   
   glBegin(GL_QUADS);
-  for (int y = 0; y < 479; y++) {
-    for (int x = 0; x < 639; x++) {
+  for (int y = 0; y < 480; y++) {
+    for (int x = 0; x < 640; x++) {
       GLfloat d1 = depthTable[depths[y * 640 + x]];
       if (d1 < 0.1) continue;
       
   const uint16_t *depths = [rawDepthField bytes];
   
   glBegin(GL_POINTS);
-  for (int y = 0; y < 479; y++) {
-    for (int x = 0; x < 639; x++) {
+  for (int y = 0; y < 480; y++) {
+    for (int x = 0; x < 640; x++) {
       GLfloat d1 = depthTable[depths[y * 640 + x]];
       if (d1 < 0.1) continue;