Update of /cvsroot/artoolkit/artoolkit/lib/SRC/Gl
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv12325
Modified Files:
gsubUtil.c gsub_lite.c
Log Message:
Add some comments, sanity checking.
Index: gsubUtil.c
===================================================================
RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/Gl/gsubUtil.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** gsubUtil.c 4 Nov 2004 08:51:43 -0000 1.1.1.1
--- gsubUtil.c 6 Aug 2007 02:37:09 -0000 1.2
***************
*** 20,26 ****
#include <AR/gsubUtil.h>
! #define CALIB_POS1_NUM 5
! #define CALIB_POS2_NUM 2
static double calib_pos[CALIB_POS1_NUM][2] = { { 160, 120 },
{ 480, 120 },
--- 20,27 ----
#include <AR/gsubUtil.h>
! #define CALIB_POS1_NUM 5 // Use 5 positions in the display image plane (x-y)
! #define CALIB_POS2_NUM 2 // Use 2 positions in the display depth axis (z)
+ // Centre of the four quadrants, and centre of whole image.
static double calib_pos[CALIB_POS1_NUM][2] = { { 160, 120 },
{ 480, 120 },
***************
*** 30,35 ****
static double calib_pos2d[CALIB_POS1_NUM][CALIB_POS2_NUM][2];
static double calib_pos3d[CALIB_POS1_NUM][CALIB_POS2_NUM][3];
! static int co1;
! static int co2;
static int left_right;
static double target_trans[3][4];
--- 31,36 ----
static double calib_pos2d[CALIB_POS1_NUM][CALIB_POS2_NUM][2];
static double calib_pos3d[CALIB_POS1_NUM][CALIB_POS2_NUM][3];
! static int co1; // Index into which x-y coordinate we are capturing.
! static int co2; // Index into which z coordinate we are capturing.
static int left_right;
static double target_trans[3][4];
Index: gsub_lite.c
===================================================================
RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/Gl/gsub_lite.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** gsub_lite.c 23 Jan 2007 00:39:27 -0000 1.24
--- gsub_lite.c 6 Aug 2007 02:37:09 -0000 1.25
***************
*** 638,641 ****
--- 638,642 ----
void arglCleanup(ARGL_CONTEXT_SETTINGS_REF contextSettings)
{
+ if (!contextSettings) return; // Sanity check.
arglCleanupTexRectangle(contextSettings);
arglCleanupTexPow2(contextSettings);
|