Skip to content

Commit

Permalink
depth: Compare the result to the value measured on hw.
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed May 22, 2015
1 parent 67e627e commit 840948c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gxtest/depth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include <gccore.h>
#include <wiiuse/wpad.h>

#define HW_PEEK 13884592

GXRModeObj *screenMode;
static void *frameBuffer;
static vu8 readyForCopy;
Expand Down Expand Up @@ -160,6 +162,12 @@ static void test_peek(u16 x, u16 y)
GX_PeekZ(x, y, &z);
printf("Z Peek: %d\n",z);

// Compare to hardware
if (z != HW_PEEK)
printf("The Z value is INACCURATE!\n");
else
printf("The Z value is accurate.\n");

// Mark the location
GX_PokeBlendMode(GX_BM_LOGIC, 1, 0, GX_LO_COPY);
GX_PokeColorUpdate(GX_TRUE);
Expand Down

0 comments on commit 840948c

Please sign in to comment.