istereo

changeset 30:8dd271942543

fixed everything
author John Tsiombikas <nuclear@mutantstargoat.com>
date Thu, 08 Sep 2011 14:52:13 +0300
parents fb4c9641059f
children 3d933b796ad2
files .hgignore istereo.xcodeproj/project.pbxproj sdr/text.p.glsl sdr/tunnel.p.glsl sdr/tunnel.v.glsl src/EAGLView.m src/ES2Renderer.h src/ES2Renderer.m src/istereo.c
diffstat 9 files changed, 640 insertions(+), 53 deletions(-) [+]
line diff
     1.1 --- a/.hgignore	Thu Sep 08 08:31:15 2011 +0300
     1.2 +++ b/.hgignore	Thu Sep 08 14:52:13 2011 +0300
     1.3 @@ -2,3 +2,6 @@
     1.4  \.d$
     1.5  \.swp$
     1.6  ^test$
     1.7 +^build/
     1.8 +.plist$
     1.9 +.pch$
     2.1 --- a/istereo.xcodeproj/project.pbxproj	Thu Sep 08 08:31:15 2011 +0300
     2.2 +++ b/istereo.xcodeproj/project.pbxproj	Thu Sep 08 14:52:13 2011 +0300
     2.3 @@ -7,10 +7,111 @@
     2.4  	objects = {
     2.5  
     2.6  /* Begin PBXBuildFile section */
     2.7 +		069BEBC414188B070043D0BB /* conv.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBBB14188B070043D0BB /* conv.c */; };
     2.8 +		069BEBC514188B070043D0BB /* file_jpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBBC14188B070043D0BB /* file_jpeg.c */; };
     2.9 +		069BEBC614188B070043D0BB /* file_png.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBBD14188B070043D0BB /* file_png.c */; };
    2.10 +		069BEBC714188B070043D0BB /* file_ppm.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBBE14188B070043D0BB /* file_ppm.c */; };
    2.11 +		069BEBC814188B070043D0BB /* ftype_module.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBBF14188B070043D0BB /* ftype_module.c */; };
    2.12 +		069BEBC914188B070043D0BB /* imago2.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBC114188B070043D0BB /* imago2.c */; };
    2.13 +		069BEBCA14188B070043D0BB /* modules.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBC314188B070043D0BB /* modules.c */; };
    2.14 +		069BEBE014188B210043D0BB /* basis_c.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBCB14188B210043D0BB /* basis_c.c */; };
    2.15 +		069BEBE114188B210043D0BB /* geom.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBCD14188B210043D0BB /* geom.c */; };
    2.16 +		069BEBE214188B210043D0BB /* matrix_c.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBCF14188B210043D0BB /* matrix_c.c */; };
    2.17 +		069BEBE314188B210043D0BB /* matrix.inl in Resources */ = {isa = PBXBuildFile; fileRef = 069BEBD114188B210043D0BB /* matrix.inl */; };
    2.18 +		069BEBE414188B210043D0BB /* quat_c.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBD214188B210043D0BB /* quat_c.c */; };
    2.19 +		069BEBE514188B210043D0BB /* quat.inl in Resources */ = {isa = PBXBuildFile; fileRef = 069BEBD414188B210043D0BB /* quat.inl */; };
    2.20 +		069BEBE614188B210043D0BB /* ray_c.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBD514188B210043D0BB /* ray_c.c */; };
    2.21 +		069BEBE714188B210043D0BB /* ray.inl in Resources */ = {isa = PBXBuildFile; fileRef = 069BEBD714188B210043D0BB /* ray.inl */; };
    2.22 +		069BEBE814188B210043D0BB /* vector.inl in Resources */ = {isa = PBXBuildFile; fileRef = 069BEBDA14188B210043D0BB /* vector.inl */; };
    2.23 +		069BEBE914188B210043D0BB /* vmath.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBDD14188B210043D0BB /* vmath.c */; };
    2.24 +		069BEBEA14188B210043D0BB /* vmath.inl in Resources */ = {isa = PBXBuildFile; fileRef = 069BEBDF14188B210043D0BB /* vmath.inl */; };
    2.25 +		069BEC2514188B330043D0BB /* jcapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBEC14188B330043D0BB /* jcapimin.c */; };
    2.26 +		069BEC2614188B330043D0BB /* jcapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBED14188B330043D0BB /* jcapistd.c */; };
    2.27 +		069BEC2714188B330043D0BB /* jccoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBEE14188B330043D0BB /* jccoefct.c */; };
    2.28 +		069BEC2814188B330043D0BB /* jccolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBEF14188B330043D0BB /* jccolor.c */; };
    2.29 +		069BEC2914188B330043D0BB /* jcdctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBF014188B330043D0BB /* jcdctmgr.c */; };
    2.30 +		069BEC2A14188B330043D0BB /* jchuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBF114188B330043D0BB /* jchuff.c */; };
    2.31 +		069BEC2B14188B330043D0BB /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBF314188B330043D0BB /* jcinit.c */; };
    2.32 +		069BEC2C14188B330043D0BB /* jcmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBF414188B330043D0BB /* jcmainct.c */; };
    2.33 +		069BEC2D14188B330043D0BB /* jcmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBF514188B330043D0BB /* jcmarker.c */; };
    2.34 +		069BEC2E14188B330043D0BB /* jcmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBF614188B330043D0BB /* jcmaster.c */; };
    2.35 +		069BEC2F14188B330043D0BB /* jcomapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBF714188B330043D0BB /* jcomapi.c */; };
    2.36 +		069BEC3014188B330043D0BB /* jcparam.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBF914188B330043D0BB /* jcparam.c */; };
    2.37 +		069BEC3114188B330043D0BB /* jcphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBFA14188B330043D0BB /* jcphuff.c */; };
    2.38 +		069BEC3214188B330043D0BB /* jcprepct.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBFB14188B330043D0BB /* jcprepct.c */; };
    2.39 +		069BEC3314188B330043D0BB /* jcsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBFC14188B330043D0BB /* jcsample.c */; };
    2.40 +		069BEC3414188B330043D0BB /* jctrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBFD14188B330043D0BB /* jctrans.c */; };
    2.41 +		069BEC3514188B330043D0BB /* jdapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBFE14188B330043D0BB /* jdapimin.c */; };
    2.42 +		069BEC3614188B330043D0BB /* jdapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBFF14188B330043D0BB /* jdapistd.c */; };
    2.43 +		069BEC3714188B330043D0BB /* jdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC0014188B330043D0BB /* jdatadst.c */; };
    2.44 +		069BEC3814188B330043D0BB /* jdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC0114188B330043D0BB /* jdatasrc.c */; };
    2.45 +		069BEC3914188B330043D0BB /* jdcoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC0214188B330043D0BB /* jdcoefct.c */; };
    2.46 +		069BEC3A14188B330043D0BB /* jdcolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC0314188B330043D0BB /* jdcolor.c */; };
    2.47 +		069BEC3B14188B330043D0BB /* jddctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC0514188B330043D0BB /* jddctmgr.c */; };
    2.48 +		069BEC3C14188B330043D0BB /* jdhuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC0614188B330043D0BB /* jdhuff.c */; };
    2.49 +		069BEC3D14188B330043D0BB /* jdinput.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC0814188B330043D0BB /* jdinput.c */; };
    2.50 +		069BEC3E14188B330043D0BB /* jdmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC0914188B330043D0BB /* jdmainct.c */; };
    2.51 +		069BEC3F14188B330043D0BB /* jdmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC0A14188B330043D0BB /* jdmarker.c */; };
    2.52 +		069BEC4014188B330043D0BB /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC0B14188B330043D0BB /* jdmaster.c */; };
    2.53 +		069BEC4114188B330043D0BB /* jdmerge.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC0C14188B330043D0BB /* jdmerge.c */; };
    2.54 +		069BEC4214188B330043D0BB /* jdphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC0D14188B330043D0BB /* jdphuff.c */; };
    2.55 +		069BEC4314188B330043D0BB /* jdpostct.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC0E14188B330043D0BB /* jdpostct.c */; };
    2.56 +		069BEC4414188B330043D0BB /* jdsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC0F14188B330043D0BB /* jdsample.c */; };
    2.57 +		069BEC4514188B330043D0BB /* jdtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC1014188B330043D0BB /* jdtrans.c */; };
    2.58 +		069BEC4614188B330043D0BB /* jerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC1114188B330043D0BB /* jerror.c */; };
    2.59 +		069BEC4714188B330043D0BB /* jfdctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC1314188B330043D0BB /* jfdctflt.c */; };
    2.60 +		069BEC4814188B330043D0BB /* jfdctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC1414188B330043D0BB /* jfdctfst.c */; };
    2.61 +		069BEC4914188B330043D0BB /* jfdctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC1514188B330043D0BB /* jfdctint.c */; };
    2.62 +		069BEC4A14188B330043D0BB /* jidctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC1614188B330043D0BB /* jidctflt.c */; };
    2.63 +		069BEC4B14188B330043D0BB /* jidctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC1714188B330043D0BB /* jidctfst.c */; };
    2.64 +		069BEC4C14188B330043D0BB /* jidctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC1814188B330043D0BB /* jidctint.c */; };
    2.65 +		069BEC4D14188B330043D0BB /* jidctred.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC1914188B330043D0BB /* jidctred.c */; };
    2.66 +		069BEC4E14188B330043D0BB /* jmemmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC1B14188B330043D0BB /* jmemmgr.c */; };
    2.67 +		069BEC4F14188B330043D0BB /* jmemnobs.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC1C14188B330043D0BB /* jmemnobs.c */; };
    2.68 +		069BEC5014188B330043D0BB /* jquant1.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC2114188B330043D0BB /* jquant1.c */; };
    2.69 +		069BEC5114188B330043D0BB /* jquant2.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC2214188B330043D0BB /* jquant2.c */; };
    2.70 +		069BEC5214188B330043D0BB /* jutils.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC2314188B330043D0BB /* jutils.c */; };
    2.71 +		069BEC6914188B430043D0BB /* adler32.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC5314188B430043D0BB /* adler32.c */; };
    2.72 +		069BEC6A14188B430043D0BB /* compress.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC5414188B430043D0BB /* compress.c */; };
    2.73 +		069BEC6B14188B430043D0BB /* crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC5514188B430043D0BB /* crc32.c */; };
    2.74 +		069BEC6C14188B430043D0BB /* deflate.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC5714188B430043D0BB /* deflate.c */; };
    2.75 +		069BEC6D14188B430043D0BB /* gzio.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC5914188B430043D0BB /* gzio.c */; };
    2.76 +		069BEC6E14188B430043D0BB /* infback.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC5A14188B430043D0BB /* infback.c */; };
    2.77 +		069BEC6F14188B430043D0BB /* inffast.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC5B14188B430043D0BB /* inffast.c */; };
    2.78 +		069BEC7014188B430043D0BB /* inflate.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC5E14188B430043D0BB /* inflate.c */; };
    2.79 +		069BEC7114188B430043D0BB /* inftrees.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC6014188B430043D0BB /* inftrees.c */; };
    2.80 +		069BEC7214188B430043D0BB /* trees.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC6214188B430043D0BB /* trees.c */; };
    2.81 +		069BEC7314188B430043D0BB /* uncompr.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC6414188B430043D0BB /* uncompr.c */; };
    2.82 +		069BEC7414188B430043D0BB /* zutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC6714188B430043D0BB /* zutil.c */; };
    2.83 +		069BEC8814188B530043D0BB /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC7514188B530043D0BB /* png.c */; };
    2.84 +		069BEC8914188B530043D0BB /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC7814188B530043D0BB /* pngerror.c */; };
    2.85 +		069BEC8A14188B530043D0BB /* pnggccrd.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC7914188B530043D0BB /* pnggccrd.c */; };
    2.86 +		069BEC8B14188B530043D0BB /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC7A14188B530043D0BB /* pngget.c */; };
    2.87 +		069BEC8C14188B530043D0BB /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC7B14188B530043D0BB /* pngmem.c */; };
    2.88 +		069BEC8D14188B530043D0BB /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC7C14188B530043D0BB /* pngpread.c */; };
    2.89 +		069BEC8E14188B530043D0BB /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC7D14188B530043D0BB /* pngread.c */; };
    2.90 +		069BEC8F14188B530043D0BB /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC7E14188B530043D0BB /* pngrio.c */; };
    2.91 +		069BEC9014188B530043D0BB /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC7F14188B530043D0BB /* pngrtran.c */; };
    2.92 +		069BEC9114188B530043D0BB /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC8014188B530043D0BB /* pngrutil.c */; };
    2.93 +		069BEC9214188B530043D0BB /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC8114188B530043D0BB /* pngset.c */; };
    2.94 +		069BEC9314188B530043D0BB /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC8214188B530043D0BB /* pngtrans.c */; };
    2.95 +		069BEC9414188B530043D0BB /* pngvcrd.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC8314188B530043D0BB /* pngvcrd.c */; };
    2.96 +		069BEC9514188B530043D0BB /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC8414188B530043D0BB /* pngwio.c */; };
    2.97 +		069BEC9614188B530043D0BB /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC8514188B530043D0BB /* pngwrite.c */; };
    2.98 +		069BEC9714188B530043D0BB /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC8614188B530043D0BB /* pngwtran.c */; };
    2.99 +		069BEC9814188B530043D0BB /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEC8714188B530043D0BB /* pngwutil.c */; };
   2.100 +		069BEC9D14188B640043D0BB /* text.p.glsl in Resources */ = {isa = PBXBuildFile; fileRef = 069BEC9914188B640043D0BB /* text.p.glsl */; };
   2.101 +		069BEC9E14188B640043D0BB /* text.v.glsl in Resources */ = {isa = PBXBuildFile; fileRef = 069BEC9A14188B640043D0BB /* text.v.glsl */; };
   2.102 +		069BEC9F14188B640043D0BB /* tunnel.p.glsl in Resources */ = {isa = PBXBuildFile; fileRef = 069BEC9B14188B640043D0BB /* tunnel.p.glsl */; };
   2.103 +		069BECA014188B640043D0BB /* tunnel.v.glsl in Resources */ = {isa = PBXBuildFile; fileRef = 069BEC9C14188B640043D0BB /* tunnel.v.glsl */; };
   2.104 +		069BECA514188BC60043D0BB /* stonewall_normal.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 069BECA114188BC60043D0BB /* stonewall_normal.jpg */; };
   2.105 +		069BECA614188BC60043D0BB /* stonewall.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 069BECA214188BC60043D0BB /* stonewall.jpg */; };
   2.106 +		069BECA714188BC60043D0BB /* text.png in Resources */ = {isa = PBXBuildFile; fileRef = 069BECA314188BC60043D0BB /* text.png */; };
   2.107 +		069BECA814188BC60043D0BB /* tiles.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 069BECA414188BC60043D0BB /* tiles.jpg */; };
   2.108 +		069BED821418D1E90043D0BB /* ES2Renderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 06D8CEB61418314000EF1378 /* ES2Renderer.m */; };
   2.109  		06D8CEC71418314000EF1378 /* cam.c in Sources */ = {isa = PBXBuildFile; fileRef = 06D8CEAE1418314000EF1378 /* cam.c */; };
   2.110  		06D8CEC81418314000EF1378 /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 06D8CEB21418314000EF1378 /* EAGLView.m */; };
   2.111  		06D8CEC91418314000EF1378 /* ES1Renderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 06D8CEB41418314000EF1378 /* ES1Renderer.m */; };
   2.112 -		06D8CECA1418314000EF1378 /* ES2Renderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 06D8CEB61418314000EF1378 /* ES2Renderer.m */; };
   2.113  		06D8CECB1418314000EF1378 /* istereo.c in Sources */ = {isa = PBXBuildFile; fileRef = 06D8CEB81418314000EF1378 /* istereo.c */; };
   2.114  		06D8CECD1418314000EF1378 /* istereoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 06D8CEBC1418314000EF1378 /* istereoAppDelegate.m */; };
   2.115  		06D8CECE1418314000EF1378 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 06D8CEBD1418314000EF1378 /* main.m */; };
   2.116 @@ -18,7 +119,6 @@
   2.117  		06D8CED01418314000EF1378 /* sanegl.c in Sources */ = {isa = PBXBuildFile; fileRef = 06D8CEC11418314000EF1378 /* sanegl.c */; };
   2.118  		06D8CED11418314000EF1378 /* sdr.c in Sources */ = {isa = PBXBuildFile; fileRef = 06D8CEC31418314000EF1378 /* sdr.c */; };
   2.119  		06D8CED21418314000EF1378 /* tex.c in Sources */ = {isa = PBXBuildFile; fileRef = 06D8CEC51418314000EF1378 /* tex.c */; };
   2.120 -		06D8CED51418317200EF1378 /* tiles.ppm in Resources */ = {isa = PBXBuildFile; fileRef = 06D8CED41418317200EF1378 /* tiles.ppm */; };
   2.121  		06D8CED81418318400EF1378 /* test.p.glsl in Resources */ = {isa = PBXBuildFile; fileRef = 06D8CED61418318400EF1378 /* test.p.glsl */; };
   2.122  		06D8CED91418318400EF1378 /* test.v.glsl in Resources */ = {isa = PBXBuildFile; fileRef = 06D8CED71418318400EF1378 /* test.v.glsl */; };
   2.123  		1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
   2.124 @@ -30,6 +130,143 @@
   2.125  /* End PBXBuildFile section */
   2.126  
   2.127  /* Begin PBXFileReference section */
   2.128 +		069BEBBB14188B070043D0BB /* conv.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = conv.c; path = libs/imago2/conv.c; sourceTree = "<group>"; };
   2.129 +		069BEBBC14188B070043D0BB /* file_jpeg.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = file_jpeg.c; path = libs/imago2/file_jpeg.c; sourceTree = "<group>"; };
   2.130 +		069BEBBD14188B070043D0BB /* file_png.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = file_png.c; path = libs/imago2/file_png.c; sourceTree = "<group>"; };
   2.131 +		069BEBBE14188B070043D0BB /* file_ppm.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = file_ppm.c; path = libs/imago2/file_ppm.c; sourceTree = "<group>"; };
   2.132 +		069BEBBF14188B070043D0BB /* ftype_module.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = ftype_module.c; path = libs/imago2/ftype_module.c; sourceTree = "<group>"; };
   2.133 +		069BEBC014188B070043D0BB /* ftype_module.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = ftype_module.h; path = libs/imago2/ftype_module.h; sourceTree = "<group>"; };
   2.134 +		069BEBC114188B070043D0BB /* imago2.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = imago2.c; path = libs/imago2/imago2.c; sourceTree = "<group>"; };
   2.135 +		069BEBC214188B070043D0BB /* imago2.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = imago2.h; path = libs/imago2/imago2.h; sourceTree = "<group>"; };
   2.136 +		069BEBC314188B070043D0BB /* modules.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = modules.c; path = libs/imago2/modules.c; sourceTree = "<group>"; };
   2.137 +		069BEBCB14188B210043D0BB /* basis_c.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = basis_c.c; path = libs/vmath/basis_c.c; sourceTree = "<group>"; };
   2.138 +		069BEBCC14188B210043D0BB /* basis.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = basis.h; path = libs/vmath/basis.h; sourceTree = "<group>"; };
   2.139 +		069BEBCD14188B210043D0BB /* geom.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = geom.c; path = libs/vmath/geom.c; sourceTree = "<group>"; };
   2.140 +		069BEBCE14188B210043D0BB /* geom.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = geom.h; path = libs/vmath/geom.h; sourceTree = "<group>"; };
   2.141 +		069BEBCF14188B210043D0BB /* matrix_c.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = matrix_c.c; path = libs/vmath/matrix_c.c; sourceTree = "<group>"; };
   2.142 +		069BEBD014188B210043D0BB /* matrix.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = matrix.h; path = libs/vmath/matrix.h; sourceTree = "<group>"; };
   2.143 +		069BEBD114188B210043D0BB /* matrix.inl */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = text; name = matrix.inl; path = libs/vmath/matrix.inl; sourceTree = "<group>"; };
   2.144 +		069BEBD214188B210043D0BB /* quat_c.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = quat_c.c; path = libs/vmath/quat_c.c; sourceTree = "<group>"; };
   2.145 +		069BEBD314188B210043D0BB /* quat.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = quat.h; path = libs/vmath/quat.h; sourceTree = "<group>"; };
   2.146 +		069BEBD414188B210043D0BB /* quat.inl */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = text; name = quat.inl; path = libs/vmath/quat.inl; sourceTree = "<group>"; };
   2.147 +		069BEBD514188B210043D0BB /* ray_c.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = ray_c.c; path = libs/vmath/ray_c.c; sourceTree = "<group>"; };
   2.148 +		069BEBD614188B210043D0BB /* ray.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = ray.h; path = libs/vmath/ray.h; sourceTree = "<group>"; };
   2.149 +		069BEBD714188B210043D0BB /* ray.inl */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = text; name = ray.inl; path = libs/vmath/ray.inl; sourceTree = "<group>"; };
   2.150 +		069BEBD814188B210043D0BB /* sphvec.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = sphvec.h; path = libs/vmath/sphvec.h; sourceTree = "<group>"; };
   2.151 +		069BEBD914188B210043D0BB /* vector.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = vector.h; path = libs/vmath/vector.h; sourceTree = "<group>"; };
   2.152 +		069BEBDA14188B210043D0BB /* vector.inl */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = text; name = vector.inl; path = libs/vmath/vector.inl; sourceTree = "<group>"; };
   2.153 +		069BEBDB14188B210043D0BB /* vmath_config.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = vmath_config.h; path = libs/vmath/vmath_config.h; sourceTree = "<group>"; };
   2.154 +		069BEBDC14188B210043D0BB /* vmath_types.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = vmath_types.h; path = libs/vmath/vmath_types.h; sourceTree = "<group>"; };
   2.155 +		069BEBDD14188B210043D0BB /* vmath.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = vmath.c; path = libs/vmath/vmath.c; sourceTree = "<group>"; };
   2.156 +		069BEBDE14188B210043D0BB /* vmath.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = vmath.h; path = libs/vmath/vmath.h; sourceTree = "<group>"; };
   2.157 +		069BEBDF14188B210043D0BB /* vmath.inl */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = text; name = vmath.inl; path = libs/vmath/vmath.inl; sourceTree = "<group>"; };
   2.158 +		069BEBEB14188B330043D0BB /* cderror.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = cderror.h; path = libs/libjpeg/cderror.h; sourceTree = "<group>"; };
   2.159 +		069BEBEC14188B330043D0BB /* jcapimin.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jcapimin.c; path = libs/libjpeg/jcapimin.c; sourceTree = "<group>"; };
   2.160 +		069BEBED14188B330043D0BB /* jcapistd.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jcapistd.c; path = libs/libjpeg/jcapistd.c; sourceTree = "<group>"; };
   2.161 +		069BEBEE14188B330043D0BB /* jccoefct.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jccoefct.c; path = libs/libjpeg/jccoefct.c; sourceTree = "<group>"; };
   2.162 +		069BEBEF14188B330043D0BB /* jccolor.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jccolor.c; path = libs/libjpeg/jccolor.c; sourceTree = "<group>"; };
   2.163 +		069BEBF014188B330043D0BB /* jcdctmgr.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jcdctmgr.c; path = libs/libjpeg/jcdctmgr.c; sourceTree = "<group>"; };
   2.164 +		069BEBF114188B330043D0BB /* jchuff.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jchuff.c; path = libs/libjpeg/jchuff.c; sourceTree = "<group>"; };
   2.165 +		069BEBF214188B330043D0BB /* jchuff.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = jchuff.h; path = libs/libjpeg/jchuff.h; sourceTree = "<group>"; };
   2.166 +		069BEBF314188B330043D0BB /* jcinit.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jcinit.c; path = libs/libjpeg/jcinit.c; sourceTree = "<group>"; };
   2.167 +		069BEBF414188B330043D0BB /* jcmainct.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jcmainct.c; path = libs/libjpeg/jcmainct.c; sourceTree = "<group>"; };
   2.168 +		069BEBF514188B330043D0BB /* jcmarker.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jcmarker.c; path = libs/libjpeg/jcmarker.c; sourceTree = "<group>"; };
   2.169 +		069BEBF614188B330043D0BB /* jcmaster.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jcmaster.c; path = libs/libjpeg/jcmaster.c; sourceTree = "<group>"; };
   2.170 +		069BEBF714188B330043D0BB /* jcomapi.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jcomapi.c; path = libs/libjpeg/jcomapi.c; sourceTree = "<group>"; };
   2.171 +		069BEBF814188B330043D0BB /* jconfig.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = jconfig.h; path = libs/libjpeg/jconfig.h; sourceTree = "<group>"; };
   2.172 +		069BEBF914188B330043D0BB /* jcparam.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jcparam.c; path = libs/libjpeg/jcparam.c; sourceTree = "<group>"; };
   2.173 +		069BEBFA14188B330043D0BB /* jcphuff.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jcphuff.c; path = libs/libjpeg/jcphuff.c; sourceTree = "<group>"; };
   2.174 +		069BEBFB14188B330043D0BB /* jcprepct.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jcprepct.c; path = libs/libjpeg/jcprepct.c; sourceTree = "<group>"; };
   2.175 +		069BEBFC14188B330043D0BB /* jcsample.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jcsample.c; path = libs/libjpeg/jcsample.c; sourceTree = "<group>"; };
   2.176 +		069BEBFD14188B330043D0BB /* jctrans.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jctrans.c; path = libs/libjpeg/jctrans.c; sourceTree = "<group>"; };
   2.177 +		069BEBFE14188B330043D0BB /* jdapimin.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdapimin.c; path = libs/libjpeg/jdapimin.c; sourceTree = "<group>"; };
   2.178 +		069BEBFF14188B330043D0BB /* jdapistd.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdapistd.c; path = libs/libjpeg/jdapistd.c; sourceTree = "<group>"; };
   2.179 +		069BEC0014188B330043D0BB /* jdatadst.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdatadst.c; path = libs/libjpeg/jdatadst.c; sourceTree = "<group>"; };
   2.180 +		069BEC0114188B330043D0BB /* jdatasrc.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdatasrc.c; path = libs/libjpeg/jdatasrc.c; sourceTree = "<group>"; };
   2.181 +		069BEC0214188B330043D0BB /* jdcoefct.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdcoefct.c; path = libs/libjpeg/jdcoefct.c; sourceTree = "<group>"; };
   2.182 +		069BEC0314188B330043D0BB /* jdcolor.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdcolor.c; path = libs/libjpeg/jdcolor.c; sourceTree = "<group>"; };
   2.183 +		069BEC0414188B330043D0BB /* jdct.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = jdct.h; path = libs/libjpeg/jdct.h; sourceTree = "<group>"; };
   2.184 +		069BEC0514188B330043D0BB /* jddctmgr.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jddctmgr.c; path = libs/libjpeg/jddctmgr.c; sourceTree = "<group>"; };
   2.185 +		069BEC0614188B330043D0BB /* jdhuff.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdhuff.c; path = libs/libjpeg/jdhuff.c; sourceTree = "<group>"; };
   2.186 +		069BEC0714188B330043D0BB /* jdhuff.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = jdhuff.h; path = libs/libjpeg/jdhuff.h; sourceTree = "<group>"; };
   2.187 +		069BEC0814188B330043D0BB /* jdinput.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdinput.c; path = libs/libjpeg/jdinput.c; sourceTree = "<group>"; };
   2.188 +		069BEC0914188B330043D0BB /* jdmainct.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdmainct.c; path = libs/libjpeg/jdmainct.c; sourceTree = "<group>"; };
   2.189 +		069BEC0A14188B330043D0BB /* jdmarker.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdmarker.c; path = libs/libjpeg/jdmarker.c; sourceTree = "<group>"; };
   2.190 +		069BEC0B14188B330043D0BB /* jdmaster.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdmaster.c; path = libs/libjpeg/jdmaster.c; sourceTree = "<group>"; };
   2.191 +		069BEC0C14188B330043D0BB /* jdmerge.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdmerge.c; path = libs/libjpeg/jdmerge.c; sourceTree = "<group>"; };
   2.192 +		069BEC0D14188B330043D0BB /* jdphuff.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdphuff.c; path = libs/libjpeg/jdphuff.c; sourceTree = "<group>"; };
   2.193 +		069BEC0E14188B330043D0BB /* jdpostct.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdpostct.c; path = libs/libjpeg/jdpostct.c; sourceTree = "<group>"; };
   2.194 +		069BEC0F14188B330043D0BB /* jdsample.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdsample.c; path = libs/libjpeg/jdsample.c; sourceTree = "<group>"; };
   2.195 +		069BEC1014188B330043D0BB /* jdtrans.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jdtrans.c; path = libs/libjpeg/jdtrans.c; sourceTree = "<group>"; };
   2.196 +		069BEC1114188B330043D0BB /* jerror.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jerror.c; path = libs/libjpeg/jerror.c; sourceTree = "<group>"; };
   2.197 +		069BEC1214188B330043D0BB /* jerror.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = jerror.h; path = libs/libjpeg/jerror.h; sourceTree = "<group>"; };
   2.198 +		069BEC1314188B330043D0BB /* jfdctflt.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jfdctflt.c; path = libs/libjpeg/jfdctflt.c; sourceTree = "<group>"; };
   2.199 +		069BEC1414188B330043D0BB /* jfdctfst.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jfdctfst.c; path = libs/libjpeg/jfdctfst.c; sourceTree = "<group>"; };
   2.200 +		069BEC1514188B330043D0BB /* jfdctint.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jfdctint.c; path = libs/libjpeg/jfdctint.c; sourceTree = "<group>"; };
   2.201 +		069BEC1614188B330043D0BB /* jidctflt.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jidctflt.c; path = libs/libjpeg/jidctflt.c; sourceTree = "<group>"; };
   2.202 +		069BEC1714188B330043D0BB /* jidctfst.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jidctfst.c; path = libs/libjpeg/jidctfst.c; sourceTree = "<group>"; };
   2.203 +		069BEC1814188B330043D0BB /* jidctint.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jidctint.c; path = libs/libjpeg/jidctint.c; sourceTree = "<group>"; };
   2.204 +		069BEC1914188B330043D0BB /* jidctred.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jidctred.c; path = libs/libjpeg/jidctred.c; sourceTree = "<group>"; };
   2.205 +		069BEC1A14188B330043D0BB /* jinclude.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = jinclude.h; path = libs/libjpeg/jinclude.h; sourceTree = "<group>"; };
   2.206 +		069BEC1B14188B330043D0BB /* jmemmgr.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jmemmgr.c; path = libs/libjpeg/jmemmgr.c; sourceTree = "<group>"; };
   2.207 +		069BEC1C14188B330043D0BB /* jmemnobs.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jmemnobs.c; path = libs/libjpeg/jmemnobs.c; sourceTree = "<group>"; };
   2.208 +		069BEC1D14188B330043D0BB /* jmemsys.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = jmemsys.h; path = libs/libjpeg/jmemsys.h; sourceTree = "<group>"; };
   2.209 +		069BEC1E14188B330043D0BB /* jmorecfg.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = jmorecfg.h; path = libs/libjpeg/jmorecfg.h; sourceTree = "<group>"; };
   2.210 +		069BEC1F14188B330043D0BB /* jpegint.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = jpegint.h; path = libs/libjpeg/jpegint.h; sourceTree = "<group>"; };
   2.211 +		069BEC2014188B330043D0BB /* jpeglib.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = jpeglib.h; path = libs/libjpeg/jpeglib.h; sourceTree = "<group>"; };
   2.212 +		069BEC2114188B330043D0BB /* jquant1.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jquant1.c; path = libs/libjpeg/jquant1.c; sourceTree = "<group>"; };
   2.213 +		069BEC2214188B330043D0BB /* jquant2.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jquant2.c; path = libs/libjpeg/jquant2.c; sourceTree = "<group>"; };
   2.214 +		069BEC2314188B330043D0BB /* jutils.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = jutils.c; path = libs/libjpeg/jutils.c; sourceTree = "<group>"; };
   2.215 +		069BEC2414188B330043D0BB /* jversion.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = jversion.h; path = libs/libjpeg/jversion.h; sourceTree = "<group>"; };
   2.216 +		069BEC5314188B430043D0BB /* adler32.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = adler32.c; path = libs/zlib/adler32.c; sourceTree = "<group>"; };
   2.217 +		069BEC5414188B430043D0BB /* compress.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = compress.c; path = libs/zlib/compress.c; sourceTree = "<group>"; };
   2.218 +		069BEC5514188B430043D0BB /* crc32.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = crc32.c; path = libs/zlib/crc32.c; sourceTree = "<group>"; };
   2.219 +		069BEC5614188B430043D0BB /* crc32.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = crc32.h; path = libs/zlib/crc32.h; sourceTree = "<group>"; };
   2.220 +		069BEC5714188B430043D0BB /* deflate.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = deflate.c; path = libs/zlib/deflate.c; sourceTree = "<group>"; };
   2.221 +		069BEC5814188B430043D0BB /* deflate.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = deflate.h; path = libs/zlib/deflate.h; sourceTree = "<group>"; };
   2.222 +		069BEC5914188B430043D0BB /* gzio.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = gzio.c; path = libs/zlib/gzio.c; sourceTree = "<group>"; };
   2.223 +		069BEC5A14188B430043D0BB /* infback.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = infback.c; path = libs/zlib/infback.c; sourceTree = "<group>"; };
   2.224 +		069BEC5B14188B430043D0BB /* inffast.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = inffast.c; path = libs/zlib/inffast.c; sourceTree = "<group>"; };
   2.225 +		069BEC5C14188B430043D0BB /* inffast.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = inffast.h; path = libs/zlib/inffast.h; sourceTree = "<group>"; };
   2.226 +		069BEC5D14188B430043D0BB /* inffixed.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = inffixed.h; path = libs/zlib/inffixed.h; sourceTree = "<group>"; };
   2.227 +		069BEC5E14188B430043D0BB /* inflate.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = inflate.c; path = libs/zlib/inflate.c; sourceTree = "<group>"; };
   2.228 +		069BEC5F14188B430043D0BB /* inflate.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = inflate.h; path = libs/zlib/inflate.h; sourceTree = "<group>"; };
   2.229 +		069BEC6014188B430043D0BB /* inftrees.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = inftrees.c; path = libs/zlib/inftrees.c; sourceTree = "<group>"; };
   2.230 +		069BEC6114188B430043D0BB /* inftrees.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = inftrees.h; path = libs/zlib/inftrees.h; sourceTree = "<group>"; };
   2.231 +		069BEC6214188B430043D0BB /* trees.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = trees.c; path = libs/zlib/trees.c; sourceTree = "<group>"; };
   2.232 +		069BEC6314188B430043D0BB /* trees.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = trees.h; path = libs/zlib/trees.h; sourceTree = "<group>"; };
   2.233 +		069BEC6414188B430043D0BB /* uncompr.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = uncompr.c; path = libs/zlib/uncompr.c; sourceTree = "<group>"; };
   2.234 +		069BEC6514188B430043D0BB /* zconf.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = zconf.h; path = libs/zlib/zconf.h; sourceTree = "<group>"; };
   2.235 +		069BEC6614188B430043D0BB /* zlib.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = zlib.h; path = libs/zlib/zlib.h; sourceTree = "<group>"; };
   2.236 +		069BEC6714188B430043D0BB /* zutil.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = zutil.c; path = libs/zlib/zutil.c; sourceTree = "<group>"; };
   2.237 +		069BEC6814188B430043D0BB /* zutil.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = zutil.h; path = libs/zlib/zutil.h; sourceTree = "<group>"; };
   2.238 +		069BEC7514188B530043D0BB /* png.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = png.c; path = libs/libpng/png.c; sourceTree = "<group>"; };
   2.239 +		069BEC7614188B530043D0BB /* png.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = png.h; path = libs/libpng/png.h; sourceTree = "<group>"; };
   2.240 +		069BEC7714188B530043D0BB /* pngconf.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = pngconf.h; path = libs/libpng/pngconf.h; sourceTree = "<group>"; };
   2.241 +		069BEC7814188B530043D0BB /* pngerror.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngerror.c; path = libs/libpng/pngerror.c; sourceTree = "<group>"; };
   2.242 +		069BEC7914188B530043D0BB /* pnggccrd.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pnggccrd.c; path = libs/libpng/pnggccrd.c; sourceTree = "<group>"; };
   2.243 +		069BEC7A14188B530043D0BB /* pngget.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngget.c; path = libs/libpng/pngget.c; sourceTree = "<group>"; };
   2.244 +		069BEC7B14188B530043D0BB /* pngmem.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngmem.c; path = libs/libpng/pngmem.c; sourceTree = "<group>"; };
   2.245 +		069BEC7C14188B530043D0BB /* pngpread.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngpread.c; path = libs/libpng/pngpread.c; sourceTree = "<group>"; };
   2.246 +		069BEC7D14188B530043D0BB /* pngread.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngread.c; path = libs/libpng/pngread.c; sourceTree = "<group>"; };
   2.247 +		069BEC7E14188B530043D0BB /* pngrio.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngrio.c; path = libs/libpng/pngrio.c; sourceTree = "<group>"; };
   2.248 +		069BEC7F14188B530043D0BB /* pngrtran.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngrtran.c; path = libs/libpng/pngrtran.c; sourceTree = "<group>"; };
   2.249 +		069BEC8014188B530043D0BB /* pngrutil.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngrutil.c; path = libs/libpng/pngrutil.c; sourceTree = "<group>"; };
   2.250 +		069BEC8114188B530043D0BB /* pngset.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngset.c; path = libs/libpng/pngset.c; sourceTree = "<group>"; };
   2.251 +		069BEC8214188B530043D0BB /* pngtrans.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngtrans.c; path = libs/libpng/pngtrans.c; sourceTree = "<group>"; };
   2.252 +		069BEC8314188B530043D0BB /* pngvcrd.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngvcrd.c; path = libs/libpng/pngvcrd.c; sourceTree = "<group>"; };
   2.253 +		069BEC8414188B530043D0BB /* pngwio.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngwio.c; path = libs/libpng/pngwio.c; sourceTree = "<group>"; };
   2.254 +		069BEC8514188B530043D0BB /* pngwrite.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngwrite.c; path = libs/libpng/pngwrite.c; sourceTree = "<group>"; };
   2.255 +		069BEC8614188B530043D0BB /* pngwtran.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngwtran.c; path = libs/libpng/pngwtran.c; sourceTree = "<group>"; };
   2.256 +		069BEC8714188B530043D0BB /* pngwutil.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pngwutil.c; path = libs/libpng/pngwutil.c; sourceTree = "<group>"; };
   2.257 +		069BEC9914188B640043D0BB /* text.p.glsl */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = text; name = text.p.glsl; path = sdr/text.p.glsl; sourceTree = "<group>"; };
   2.258 +		069BEC9A14188B640043D0BB /* text.v.glsl */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = text; name = text.v.glsl; path = sdr/text.v.glsl; sourceTree = "<group>"; };
   2.259 +		069BEC9B14188B640043D0BB /* tunnel.p.glsl */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = text; name = tunnel.p.glsl; path = sdr/tunnel.p.glsl; sourceTree = "<group>"; };
   2.260 +		069BEC9C14188B640043D0BB /* tunnel.v.glsl */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = text; name = tunnel.v.glsl; path = sdr/tunnel.v.glsl; sourceTree = "<group>"; };
   2.261 +		069BECA114188BC60043D0BB /* stonewall_normal.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = stonewall_normal.jpg; path = data/stonewall_normal.jpg; sourceTree = "<group>"; };
   2.262 +		069BECA214188BC60043D0BB /* stonewall.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = stonewall.jpg; path = data/stonewall.jpg; sourceTree = "<group>"; };
   2.263 +		069BECA314188BC60043D0BB /* text.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = text.png; path = data/text.png; sourceTree = "<group>"; };
   2.264 +		069BECA414188BC60043D0BB /* tiles.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = tiles.jpg; path = data/tiles.jpg; sourceTree = "<group>"; };
   2.265  		06D8CEAE1418314000EF1378 /* cam.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = cam.c; path = src/cam.c; sourceTree = "<group>"; };
   2.266  		06D8CEAF1418314000EF1378 /* cam.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = cam.h; path = src/cam.h; sourceTree = "<group>"; };
   2.267  		06D8CEB01418314000EF1378 /* config.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = config.h; path = src/config.h; sourceTree = "<group>"; };
   2.268 @@ -54,7 +291,6 @@
   2.269  		06D8CEC41418314000EF1378 /* sdr.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = sdr.h; path = src/sdr.h; sourceTree = "<group>"; };
   2.270  		06D8CEC51418314000EF1378 /* tex.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = tex.c; path = src/tex.c; sourceTree = "<group>"; };
   2.271  		06D8CEC61418314000EF1378 /* tex.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = tex.h; path = src/tex.h; sourceTree = "<group>"; };
   2.272 -		06D8CED41418317200EF1378 /* tiles.ppm */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = text; path = tiles.ppm; sourceTree = "<group>"; };
   2.273  		06D8CED61418318400EF1378 /* test.p.glsl */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = text; name = test.p.glsl; path = sdr/test.p.glsl; sourceTree = "<group>"; };
   2.274  		06D8CED71418318400EF1378 /* test.v.glsl */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = text; name = test.v.glsl; path = sdr/test.v.glsl; sourceTree = "<group>"; };
   2.275  		1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
   2.276 @@ -82,6 +318,182 @@
   2.277  /* End PBXFrameworksBuildPhase section */
   2.278  
   2.279  /* Begin PBXGroup section */
   2.280 +		069BEBB514188ACB0043D0BB /* libs */ = {
   2.281 +			isa = PBXGroup;
   2.282 +			children = (
   2.283 +				069BEBBA14188AE90043D0BB /* imago2 */,
   2.284 +				069BEBB914188AE30043D0BB /* vmath */,
   2.285 +				069BEBB814188ADC0043D0BB /* libjpeg */,
   2.286 +				069BEBB714188AD70043D0BB /* zlib */,
   2.287 +				069BEBB614188AD20043D0BB /* libpng */,
   2.288 +			);
   2.289 +			name = libs;
   2.290 +			sourceTree = "<group>";
   2.291 +		};
   2.292 +		069BEBB614188AD20043D0BB /* libpng */ = {
   2.293 +			isa = PBXGroup;
   2.294 +			children = (
   2.295 +				069BEC7514188B530043D0BB /* png.c */,
   2.296 +				069BEC7614188B530043D0BB /* png.h */,
   2.297 +				069BEC7714188B530043D0BB /* pngconf.h */,
   2.298 +				069BEC7814188B530043D0BB /* pngerror.c */,
   2.299 +				069BEC7914188B530043D0BB /* pnggccrd.c */,
   2.300 +				069BEC7A14188B530043D0BB /* pngget.c */,
   2.301 +				069BEC7B14188B530043D0BB /* pngmem.c */,
   2.302 +				069BEC7C14188B530043D0BB /* pngpread.c */,
   2.303 +				069BEC7D14188B530043D0BB /* pngread.c */,
   2.304 +				069BEC7E14188B530043D0BB /* pngrio.c */,
   2.305 +				069BEC7F14188B530043D0BB /* pngrtran.c */,
   2.306 +				069BEC8014188B530043D0BB /* pngrutil.c */,
   2.307 +				069BEC8114188B530043D0BB /* pngset.c */,
   2.308 +				069BEC8214188B530043D0BB /* pngtrans.c */,
   2.309 +				069BEC8314188B530043D0BB /* pngvcrd.c */,
   2.310 +				069BEC8414188B530043D0BB /* pngwio.c */,
   2.311 +				069BEC8514188B530043D0BB /* pngwrite.c */,
   2.312 +				069BEC8614188B530043D0BB /* pngwtran.c */,
   2.313 +				069BEC8714188B530043D0BB /* pngwutil.c */,
   2.314 +			);
   2.315 +			name = libpng;
   2.316 +			sourceTree = "<group>";
   2.317 +		};
   2.318 +		069BEBB714188AD70043D0BB /* zlib */ = {
   2.319 +			isa = PBXGroup;
   2.320 +			children = (
   2.321 +				069BEC5314188B430043D0BB /* adler32.c */,
   2.322 +				069BEC5414188B430043D0BB /* compress.c */,
   2.323 +				069BEC5514188B430043D0BB /* crc32.c */,
   2.324 +				069BEC5614188B430043D0BB /* crc32.h */,
   2.325 +				069BEC5714188B430043D0BB /* deflate.c */,
   2.326 +				069BEC5814188B430043D0BB /* deflate.h */,
   2.327 +				069BEC5914188B430043D0BB /* gzio.c */,
   2.328 +				069BEC5A14188B430043D0BB /* infback.c */,
   2.329 +				069BEC5B14188B430043D0BB /* inffast.c */,
   2.330 +				069BEC5C14188B430043D0BB /* inffast.h */,
   2.331 +				069BEC5D14188B430043D0BB /* inffixed.h */,
   2.332 +				069BEC5E14188B430043D0BB /* inflate.c */,
   2.333 +				069BEC5F14188B430043D0BB /* inflate.h */,
   2.334 +				069BEC6014188B430043D0BB /* inftrees.c */,
   2.335 +				069BEC6114188B430043D0BB /* inftrees.h */,
   2.336 +				069BEC6214188B430043D0BB /* trees.c */,
   2.337 +				069BEC6314188B430043D0BB /* trees.h */,
   2.338 +				069BEC6414188B430043D0BB /* uncompr.c */,
   2.339 +				069BEC6514188B430043D0BB /* zconf.h */,
   2.340 +				069BEC6614188B430043D0BB /* zlib.h */,
   2.341 +				069BEC6714188B430043D0BB /* zutil.c */,
   2.342 +				069BEC6814188B430043D0BB /* zutil.h */,
   2.343 +			);
   2.344 +			name = zlib;
   2.345 +			sourceTree = "<group>";
   2.346 +		};
   2.347 +		069BEBB814188ADC0043D0BB /* libjpeg */ = {
   2.348 +			isa = PBXGroup;
   2.349 +			children = (
   2.350 +				069BEBEB14188B330043D0BB /* cderror.h */,
   2.351 +				069BEBEC14188B330043D0BB /* jcapimin.c */,
   2.352 +				069BEBED14188B330043D0BB /* jcapistd.c */,
   2.353 +				069BEBEE14188B330043D0BB /* jccoefct.c */,
   2.354 +				069BEBEF14188B330043D0BB /* jccolor.c */,
   2.355 +				069BEBF014188B330043D0BB /* jcdctmgr.c */,
   2.356 +				069BEBF114188B330043D0BB /* jchuff.c */,
   2.357 +				069BEBF214188B330043D0BB /* jchuff.h */,
   2.358 +				069BEBF314188B330043D0BB /* jcinit.c */,
   2.359 +				069BEBF414188B330043D0BB /* jcmainct.c */,
   2.360 +				069BEBF514188B330043D0BB /* jcmarker.c */,
   2.361 +				069BEBF614188B330043D0BB /* jcmaster.c */,
   2.362 +				069BEBF714188B330043D0BB /* jcomapi.c */,
   2.363 +				069BEBF814188B330043D0BB /* jconfig.h */,
   2.364 +				069BEBF914188B330043D0BB /* jcparam.c */,
   2.365 +				069BEBFA14188B330043D0BB /* jcphuff.c */,
   2.366 +				069BEBFB14188B330043D0BB /* jcprepct.c */,
   2.367 +				069BEBFC14188B330043D0BB /* jcsample.c */,
   2.368 +				069BEBFD14188B330043D0BB /* jctrans.c */,
   2.369 +				069BEBFE14188B330043D0BB /* jdapimin.c */,
   2.370 +				069BEBFF14188B330043D0BB /* jdapistd.c */,
   2.371 +				069BEC0014188B330043D0BB /* jdatadst.c */,
   2.372 +				069BEC0114188B330043D0BB /* jdatasrc.c */,
   2.373 +				069BEC0214188B330043D0BB /* jdcoefct.c */,
   2.374 +				069BEC0314188B330043D0BB /* jdcolor.c */,
   2.375 +				069BEC0414188B330043D0BB /* jdct.h */,
   2.376 +				069BEC0514188B330043D0BB /* jddctmgr.c */,
   2.377 +				069BEC0614188B330043D0BB /* jdhuff.c */,
   2.378 +				069BEC0714188B330043D0BB /* jdhuff.h */,
   2.379 +				069BEC0814188B330043D0BB /* jdinput.c */,
   2.380 +				069BEC0914188B330043D0BB /* jdmainct.c */,
   2.381 +				069BEC0A14188B330043D0BB /* jdmarker.c */,
   2.382 +				069BEC0B14188B330043D0BB /* jdmaster.c */,
   2.383 +				069BEC0C14188B330043D0BB /* jdmerge.c */,
   2.384 +				069BEC0D14188B330043D0BB /* jdphuff.c */,
   2.385 +				069BEC0E14188B330043D0BB /* jdpostct.c */,
   2.386 +				069BEC0F14188B330043D0BB /* jdsample.c */,
   2.387 +				069BEC1014188B330043D0BB /* jdtrans.c */,
   2.388 +				069BEC1114188B330043D0BB /* jerror.c */,
   2.389 +				069BEC1214188B330043D0BB /* jerror.h */,
   2.390 +				069BEC1314188B330043D0BB /* jfdctflt.c */,
   2.391 +				069BEC1414188B330043D0BB /* jfdctfst.c */,
   2.392 +				069BEC1514188B330043D0BB /* jfdctint.c */,
   2.393 +				069BEC1614188B330043D0BB /* jidctflt.c */,
   2.394 +				069BEC1714188B330043D0BB /* jidctfst.c */,
   2.395 +				069BEC1814188B330043D0BB /* jidctint.c */,
   2.396 +				069BEC1914188B330043D0BB /* jidctred.c */,
   2.397 +				069BEC1A14188B330043D0BB /* jinclude.h */,
   2.398 +				069BEC1B14188B330043D0BB /* jmemmgr.c */,
   2.399 +				069BEC1C14188B330043D0BB /* jmemnobs.c */,
   2.400 +				069BEC1D14188B330043D0BB /* jmemsys.h */,
   2.401 +				069BEC1E14188B330043D0BB /* jmorecfg.h */,
   2.402 +				069BEC1F14188B330043D0BB /* jpegint.h */,
   2.403 +				069BEC2014188B330043D0BB /* jpeglib.h */,
   2.404 +				069BEC2114188B330043D0BB /* jquant1.c */,
   2.405 +				069BEC2214188B330043D0BB /* jquant2.c */,
   2.406 +				069BEC2314188B330043D0BB /* jutils.c */,
   2.407 +				069BEC2414188B330043D0BB /* jversion.h */,
   2.408 +			);
   2.409 +			name = libjpeg;
   2.410 +			sourceTree = "<group>";
   2.411 +		};
   2.412 +		069BEBB914188AE30043D0BB /* vmath */ = {
   2.413 +			isa = PBXGroup;
   2.414 +			children = (
   2.415 +				069BEBCB14188B210043D0BB /* basis_c.c */,
   2.416 +				069BEBCC14188B210043D0BB /* basis.h */,
   2.417 +				069BEBCD14188B210043D0BB /* geom.c */,
   2.418 +				069BEBCE14188B210043D0BB /* geom.h */,
   2.419 +				069BEBCF14188B210043D0BB /* matrix_c.c */,
   2.420 +				069BEBD014188B210043D0BB /* matrix.h */,
   2.421 +				069BEBD114188B210043D0BB /* matrix.inl */,
   2.422 +				069BEBD214188B210043D0BB /* quat_c.c */,
   2.423 +				069BEBD314188B210043D0BB /* quat.h */,
   2.424 +				069BEBD414188B210043D0BB /* quat.inl */,
   2.425 +				069BEBD514188B210043D0BB /* ray_c.c */,
   2.426 +				069BEBD614188B210043D0BB /* ray.h */,
   2.427 +				069BEBD714188B210043D0BB /* ray.inl */,
   2.428 +				069BEBD814188B210043D0BB /* sphvec.h */,
   2.429 +				069BEBD914188B210043D0BB /* vector.h */,
   2.430 +				069BEBDA14188B210043D0BB /* vector.inl */,
   2.431 +				069BEBDB14188B210043D0BB /* vmath_config.h */,
   2.432 +				069BEBDC14188B210043D0BB /* vmath_types.h */,
   2.433 +				069BEBDD14188B210043D0BB /* vmath.c */,
   2.434 +				069BEBDE14188B210043D0BB /* vmath.h */,
   2.435 +				069BEBDF14188B210043D0BB /* vmath.inl */,
   2.436 +			);
   2.437 +			name = vmath;
   2.438 +			sourceTree = "<group>";
   2.439 +		};
   2.440 +		069BEBBA14188AE90043D0BB /* imago2 */ = {
   2.441 +			isa = PBXGroup;
   2.442 +			children = (
   2.443 +				069BEBBB14188B070043D0BB /* conv.c */,
   2.444 +				069BEBBC14188B070043D0BB /* file_jpeg.c */,
   2.445 +				069BEBBD14188B070043D0BB /* file_png.c */,
   2.446 +				069BEBBE14188B070043D0BB /* file_ppm.c */,
   2.447 +				069BEBBF14188B070043D0BB /* ftype_module.c */,
   2.448 +				069BEBC014188B070043D0BB /* ftype_module.h */,
   2.449 +				069BEBC114188B070043D0BB /* imago2.c */,
   2.450 +				069BEBC214188B070043D0BB /* imago2.h */,
   2.451 +				069BEBC314188B070043D0BB /* modules.c */,
   2.452 +			);
   2.453 +			name = imago2;
   2.454 +			sourceTree = "<group>";
   2.455 +		};
   2.456  		06D8CEAC1418312500EF1378 /* src */ = {
   2.457  			isa = PBXGroup;
   2.458  			children = (
   2.459 @@ -107,6 +519,10 @@
   2.460  		06D8CEAD1418312A00EF1378 /* sdr */ = {
   2.461  			isa = PBXGroup;
   2.462  			children = (
   2.463 +				069BEC9914188B640043D0BB /* text.p.glsl */,
   2.464 +				069BEC9A14188B640043D0BB /* text.v.glsl */,
   2.465 +				069BEC9B14188B640043D0BB /* tunnel.p.glsl */,
   2.466 +				069BEC9C14188B640043D0BB /* tunnel.v.glsl */,
   2.467  				06D8CED61418318400EF1378 /* test.p.glsl */,
   2.468  				06D8CED71418318400EF1378 /* test.v.glsl */,
   2.469  			);
   2.470 @@ -141,6 +557,7 @@
   2.471  		29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
   2.472  			isa = PBXGroup;
   2.473  			children = (
   2.474 +				069BEBB514188ACB0043D0BB /* libs */,
   2.475  				06D8CEAD1418312A00EF1378 /* sdr */,
   2.476  				06D8CEAC1418312500EF1378 /* src */,
   2.477  				29B97317FDCFA39411CA2CEA /* Resources */,
   2.478 @@ -153,7 +570,10 @@
   2.479  		29B97317FDCFA39411CA2CEA /* Resources */ = {
   2.480  			isa = PBXGroup;
   2.481  			children = (
   2.482 -				06D8CED41418317200EF1378 /* tiles.ppm */,
   2.483 +				069BECA114188BC60043D0BB /* stonewall_normal.jpg */,
   2.484 +				069BECA214188BC60043D0BB /* stonewall.jpg */,
   2.485 +				069BECA314188BC60043D0BB /* text.png */,
   2.486 +				069BECA414188BC60043D0BB /* tiles.jpg */,
   2.487  				28EC4C5811D54ECE0027AA9F /* istereoViewController.xib */,
   2.488  				28AD733E0D9D9553002E5188 /* MainWindow.xib */,
   2.489  				8D1107310486CEB800E47090 /* istereo-Info.plist */,
   2.490 @@ -224,9 +644,21 @@
   2.491  			files = (
   2.492  				28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */,
   2.493  				28EC4C5A11D54ECE0027AA9F /* istereoViewController.xib in Resources */,
   2.494 -				06D8CED51418317200EF1378 /* tiles.ppm in Resources */,
   2.495  				06D8CED81418318400EF1378 /* test.p.glsl in Resources */,
   2.496  				06D8CED91418318400EF1378 /* test.v.glsl in Resources */,
   2.497 +				069BEBE314188B210043D0BB /* matrix.inl in Resources */,
   2.498 +				069BEBE514188B210043D0BB /* quat.inl in Resources */,
   2.499 +				069BEBE714188B210043D0BB /* ray.inl in Resources */,
   2.500 +				069BEBE814188B210043D0BB /* vector.inl in Resources */,
   2.501 +				069BEBEA14188B210043D0BB /* vmath.inl in Resources */,
   2.502 +				069BEC9D14188B640043D0BB /* text.p.glsl in Resources */,
   2.503 +				069BEC9E14188B640043D0BB /* text.v.glsl in Resources */,
   2.504 +				069BEC9F14188B640043D0BB /* tunnel.p.glsl in Resources */,
   2.505 +				069BECA014188B640043D0BB /* tunnel.v.glsl in Resources */,
   2.506 +				069BECA514188BC60043D0BB /* stonewall_normal.jpg in Resources */,
   2.507 +				069BECA614188BC60043D0BB /* stonewall.jpg in Resources */,
   2.508 +				069BECA714188BC60043D0BB /* text.png in Resources */,
   2.509 +				069BECA814188BC60043D0BB /* tiles.jpg in Resources */,
   2.510  			);
   2.511  			runOnlyForDeploymentPostprocessing = 0;
   2.512  		};
   2.513 @@ -256,7 +688,6 @@
   2.514  				06D8CEC71418314000EF1378 /* cam.c in Sources */,
   2.515  				06D8CEC81418314000EF1378 /* EAGLView.m in Sources */,
   2.516  				06D8CEC91418314000EF1378 /* ES1Renderer.m in Sources */,
   2.517 -				06D8CECA1418314000EF1378 /* ES2Renderer.m in Sources */,
   2.518  				06D8CECB1418314000EF1378 /* istereo.c in Sources */,
   2.519  				06D8CECD1418314000EF1378 /* istereoAppDelegate.m in Sources */,
   2.520  				06D8CECE1418314000EF1378 /* main.m in Sources */,
   2.521 @@ -264,6 +695,95 @@
   2.522  				06D8CED01418314000EF1378 /* sanegl.c in Sources */,
   2.523  				06D8CED11418314000EF1378 /* sdr.c in Sources */,
   2.524  				06D8CED21418314000EF1378 /* tex.c in Sources */,
   2.525 +				069BEBC414188B070043D0BB /* conv.c in Sources */,
   2.526 +				069BEBC514188B070043D0BB /* file_jpeg.c in Sources */,
   2.527 +				069BEBC614188B070043D0BB /* file_png.c in Sources */,
   2.528 +				069BEBC714188B070043D0BB /* file_ppm.c in Sources */,
   2.529 +				069BEBC814188B070043D0BB /* ftype_module.c in Sources */,
   2.530 +				069BEBC914188B070043D0BB /* imago2.c in Sources */,
   2.531 +				069BEBCA14188B070043D0BB /* modules.c in Sources */,
   2.532 +				069BEBE014188B210043D0BB /* basis_c.c in Sources */,
   2.533 +				069BEBE114188B210043D0BB /* geom.c in Sources */,
   2.534 +				069BEBE214188B210043D0BB /* matrix_c.c in Sources */,
   2.535 +				069BEBE414188B210043D0BB /* quat_c.c in Sources */,
   2.536 +				069BEBE614188B210043D0BB /* ray_c.c in Sources */,
   2.537 +				069BEBE914188B210043D0BB /* vmath.c in Sources */,
   2.538 +				069BEC2514188B330043D0BB /* jcapimin.c in Sources */,
   2.539 +				069BEC2614188B330043D0BB /* jcapistd.c in Sources */,
   2.540 +				069BEC2714188B330043D0BB /* jccoefct.c in Sources */,
   2.541 +				069BEC2814188B330043D0BB /* jccolor.c in Sources */,
   2.542 +				069BEC2914188B330043D0BB /* jcdctmgr.c in Sources */,
   2.543 +				069BEC2A14188B330043D0BB /* jchuff.c in Sources */,
   2.544 +				069BEC2B14188B330043D0BB /* jcinit.c in Sources */,
   2.545 +				069BEC2C14188B330043D0BB /* jcmainct.c in Sources */,
   2.546 +				069BEC2D14188B330043D0BB /* jcmarker.c in Sources */,
   2.547 +				069BEC2E14188B330043D0BB /* jcmaster.c in Sources */,
   2.548 +				069BEC2F14188B330043D0BB /* jcomapi.c in Sources */,
   2.549 +				069BEC3014188B330043D0BB /* jcparam.c in Sources */,
   2.550 +				069BEC3114188B330043D0BB /* jcphuff.c in Sources */,
   2.551 +				069BEC3214188B330043D0BB /* jcprepct.c in Sources */,
   2.552 +				069BEC3314188B330043D0BB /* jcsample.c in Sources */,
   2.553 +				069BEC3414188B330043D0BB /* jctrans.c in Sources */,
   2.554 +				069BEC3514188B330043D0BB /* jdapimin.c in Sources */,
   2.555 +				069BEC3614188B330043D0BB /* jdapistd.c in Sources */,
   2.556 +				069BEC3714188B330043D0BB /* jdatadst.c in Sources */,
   2.557 +				069BEC3814188B330043D0BB /* jdatasrc.c in Sources */,
   2.558 +				069BEC3914188B330043D0BB /* jdcoefct.c in Sources */,
   2.559 +				069BEC3A14188B330043D0BB /* jdcolor.c in Sources */,
   2.560 +				069BEC3B14188B330043D0BB /* jddctmgr.c in Sources */,
   2.561 +				069BEC3C14188B330043D0BB /* jdhuff.c in Sources */,
   2.562 +				069BEC3D14188B330043D0BB /* jdinput.c in Sources */,
   2.563 +				069BEC3E14188B330043D0BB /* jdmainct.c in Sources */,
   2.564 +				069BEC3F14188B330043D0BB /* jdmarker.c in Sources */,
   2.565 +				069BEC4014188B330043D0BB /* jdmaster.c in Sources */,
   2.566 +				069BEC4114188B330043D0BB /* jdmerge.c in Sources */,
   2.567 +				069BEC4214188B330043D0BB /* jdphuff.c in Sources */,
   2.568 +				069BEC4314188B330043D0BB /* jdpostct.c in Sources */,
   2.569 +				069BEC4414188B330043D0BB /* jdsample.c in Sources */,
   2.570 +				069BEC4514188B330043D0BB /* jdtrans.c in Sources */,
   2.571 +				069BEC4614188B330043D0BB /* jerror.c in Sources */,
   2.572 +				069BEC4714188B330043D0BB /* jfdctflt.c in Sources */,
   2.573 +				069BEC4814188B330043D0BB /* jfdctfst.c in Sources */,
   2.574 +				069BEC4914188B330043D0BB /* jfdctint.c in Sources */,
   2.575 +				069BEC4A14188B330043D0BB /* jidctflt.c in Sources */,
   2.576 +				069BEC4B14188B330043D0BB /* jidctfst.c in Sources */,
   2.577 +				069BEC4C14188B330043D0BB /* jidctint.c in Sources */,
   2.578 +				069BEC4D14188B330043D0BB /* jidctred.c in Sources */,
   2.579 +				069BEC4E14188B330043D0BB /* jmemmgr.c in Sources */,
   2.580 +				069BEC4F14188B330043D0BB /* jmemnobs.c in Sources */,
   2.581 +				069BEC5014188B330043D0BB /* jquant1.c in Sources */,
   2.582 +				069BEC5114188B330043D0BB /* jquant2.c in Sources */,
   2.583 +				069BEC5214188B330043D0BB /* jutils.c in Sources */,
   2.584 +				069BEC6914188B430043D0BB /* adler32.c in Sources */,
   2.585 +				069BEC6A14188B430043D0BB /* compress.c in Sources */,
   2.586 +				069BEC6B14188B430043D0BB /* crc32.c in Sources */,
   2.587 +				069BEC6C14188B430043D0BB /* deflate.c in Sources */,
   2.588 +				069BEC6D14188B430043D0BB /* gzio.c in Sources */,
   2.589 +				069BEC6E14188B430043D0BB /* infback.c in Sources */,
   2.590 +				069BEC6F14188B430043D0BB /* inffast.c in Sources */,
   2.591 +				069BEC7014188B430043D0BB /* inflate.c in Sources */,
   2.592 +				069BEC7114188B430043D0BB /* inftrees.c in Sources */,
   2.593 +				069BEC7214188B430043D0BB /* trees.c in Sources */,
   2.594 +				069BEC7314188B430043D0BB /* uncompr.c in Sources */,
   2.595 +				069BEC7414188B430043D0BB /* zutil.c in Sources */,
   2.596 +				069BEC8814188B530043D0BB /* png.c in Sources */,
   2.597 +				069BEC8914188B530043D0BB /* pngerror.c in Sources */,
   2.598 +				069BEC8A14188B530043D0BB /* pnggccrd.c in Sources */,
   2.599 +				069BEC8B14188B530043D0BB /* pngget.c in Sources */,
   2.600 +				069BEC8C14188B530043D0BB /* pngmem.c in Sources */,
   2.601 +				069BEC8D14188B530043D0BB /* pngpread.c in Sources */,
   2.602 +				069BEC8E14188B530043D0BB /* pngread.c in Sources */,
   2.603 +				069BEC8F14188B530043D0BB /* pngrio.c in Sources */,
   2.604 +				069BEC9014188B530043D0BB /* pngrtran.c in Sources */,
   2.605 +				069BEC9114188B530043D0BB /* pngrutil.c in Sources */,
   2.606 +				069BEC9214188B530043D0BB /* pngset.c in Sources */,
   2.607 +				069BEC9314188B530043D0BB /* pngtrans.c in Sources */,
   2.608 +				069BEC9414188B530043D0BB /* pngvcrd.c in Sources */,
   2.609 +				069BEC9514188B530043D0BB /* pngwio.c in Sources */,
   2.610 +				069BEC9614188B530043D0BB /* pngwrite.c in Sources */,
   2.611 +				069BEC9714188B530043D0BB /* pngwtran.c in Sources */,
   2.612 +				069BEC9814188B530043D0BB /* pngwutil.c in Sources */,
   2.613 +				069BED821418D1E90043D0BB /* ES2Renderer.m in Sources */,
   2.614  			);
   2.615  			runOnlyForDeploymentPostprocessing = 0;
   2.616  		};
   2.617 @@ -305,12 +825,22 @@
   2.618  				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
   2.619  				CODE_SIGN_IDENTITY = "Don't Code Sign";
   2.620  				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Don't Code Sign";
   2.621 +				COMPRESS_PNG_FILES = NO;
   2.622  				GCC_C_LANGUAGE_STANDARD = c99;
   2.623  				GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
   2.624 +				GCC_THUMB_SUPPORT = NO;
   2.625  				GCC_WARN_ABOUT_RETURN_TYPE = YES;
   2.626  				GCC_WARN_UNUSED_VARIABLE = YES;
   2.627 +				HEADER_SEARCH_PATHS = (
   2.628 +					libs/libpng,
   2.629 +					libs/libjpeg,
   2.630 +					libs/zlib,
   2.631 +					libs/vmath,
   2.632 +					libs/imago2,
   2.633 +				);
   2.634  				PREBINDING = NO;
   2.635  				SDKROOT = iphoneos;
   2.636 +				USER_HEADER_SEARCH_PATHS = "";
   2.637  			};
   2.638  			name = Debug;
   2.639  		};
   2.640 @@ -320,12 +850,22 @@
   2.641  				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
   2.642  				CODE_SIGN_IDENTITY = "Don't Code Sign";
   2.643  				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Don't Code Sign";
   2.644 +				COMPRESS_PNG_FILES = NO;
   2.645  				GCC_C_LANGUAGE_STANDARD = c99;
   2.646 +				GCC_THUMB_SUPPORT = NO;
   2.647  				GCC_WARN_ABOUT_RETURN_TYPE = YES;
   2.648  				GCC_WARN_UNUSED_VARIABLE = YES;
   2.649 +				HEADER_SEARCH_PATHS = (
   2.650 +					libs/libpng,
   2.651 +					libs/libjpeg,
   2.652 +					libs/zlib,
   2.653 +					libs/vmath,
   2.654 +					libs/imago2,
   2.655 +				);
   2.656  				OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
   2.657  				PREBINDING = NO;
   2.658  				SDKROOT = iphoneos;
   2.659 +				USER_HEADER_SEARCH_PATHS = "";
   2.660  			};
   2.661  			name = Release;
   2.662  		};
     3.1 --- a/sdr/text.p.glsl	Thu Sep 08 08:31:15 2011 +0300
     3.2 +++ b/sdr/text.p.glsl	Thu Sep 08 14:52:13 2011 +0300
     3.3 @@ -1,5 +1,5 @@
     3.4  #ifdef GL_ES
     3.5 -precision highp float;
     3.6 +precision mediump float;
     3.7  #endif
     3.8  
     3.9  uniform sampler2D tex;
     4.1 --- a/sdr/tunnel.p.glsl	Thu Sep 08 08:31:15 2011 +0300
     4.2 +++ b/sdr/tunnel.p.glsl	Thu Sep 08 14:52:13 2011 +0300
     4.3 @@ -1,5 +1,5 @@
     4.4  #ifdef GL_ES
     4.5 -precision highp float;
     4.6 +precision mediump float;
     4.7  #endif
     4.8  
     4.9  uniform sampler2D tex, tex_norm;
    4.10 @@ -40,13 +40,12 @@
    4.11  	vec3 h = normalize(v + l);
    4.12  	float specular = pow(max(dot(n, h), 0.0), 60.0);
    4.13  
    4.14 -	vec3 amb = vec3(0.02, 0.02, 0.02);
    4.15 +	const vec3 amb = vec3(0.02, 0.02, 0.02);
    4.16  
    4.17  	float att = clamp(1.0 / (0.5 * (ldist * ldist)), 0.0, 1.0);
    4.18  
    4.19  	vec3 dif = tcol * diffuse * att;
    4.20  	vec3 spec = vec3(0.6, 0.6, 0.6) * specular * att;
    4.21  
    4.22 -	//gl_FragColor = 0.5 * tcol + 0.5 * tnorm;//mix(fog_color, tcol, fog);
    4.23  	gl_FragColor = vec4(fog * (amb + dif + spec), 1.0);
    4.24  }
     5.1 --- a/sdr/tunnel.v.glsl	Thu Sep 08 08:31:15 2011 +0300
     5.2 +++ b/sdr/tunnel.v.glsl	Thu Sep 08 14:52:13 2011 +0300
     5.3 @@ -1,9 +1,10 @@
     5.4 -attribute vec4 attr_vertex, attr_color, attr_texcoord;
     5.5 +attribute vec4 attr_vertex, attr_color;
     5.6 +attribute vec2 attr_texcoord;
     5.7  attribute vec4 attr_tangent;
     5.8  attribute vec3 attr_normal;
     5.9  
    5.10  uniform mat4 matrix_modelview, matrix_projection, matrix_texture;
    5.11 -uniform mat3 normmat;
    5.12 +uniform mat3 matrix_normal;
    5.13  uniform float t;
    5.14  uniform vec4 light_pos;
    5.15  
    5.16 @@ -18,10 +19,10 @@
    5.17  
    5.18  	vpos = (matrix_modelview * attr_vertex).xyz;
    5.19  
    5.20 -	normal = normmat * attr_normal;
    5.21 -	tangent = normmat * attr_tangent.xyz;
    5.22 +	normal = matrix_normal * attr_normal;
    5.23 +	tangent = matrix_normal * attr_tangent.xyz;
    5.24  
    5.25  	lpos = (matrix_modelview * light_pos).xyz;
    5.26  
    5.27 -	tc = matrix_texture * attr_texcoord;
    5.28 +	tc = matrix_texture * vec4(attr_texcoord, 0.0, 1.0);
    5.29  }
     6.1 --- a/src/EAGLView.m	Thu Sep 08 08:31:15 2011 +0300
     6.2 +++ b/src/EAGLView.m	Thu Sep 08 14:52:13 2011 +0300
     6.3 @@ -24,12 +24,14 @@
     6.4  
     6.5  //The EAGL view is stored in the nib file. When it's unarchived it's sent -initWithCoder:
     6.6  - (id)initWithCoder:(NSCoder*)coder
     6.7 -{    
     6.8 +{
     6.9      if ((self = [super initWithCoder:coder]))
    6.10      {
    6.11          // Get the layer
    6.12          CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;
    6.13  
    6.14 +		//self.contentScaleFactor = 2.0;
    6.15 +
    6.16          eaglLayer.opaque = TRUE;
    6.17          eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
    6.18                                          [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil];
    6.19 @@ -59,6 +61,8 @@
    6.20          NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
    6.21          if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending)
    6.22              displayLinkSupported = TRUE;
    6.23 +
    6.24 +		self.multipleTouchEnabled = 1;
    6.25      }
    6.26  
    6.27      return self;
    6.28 @@ -140,6 +144,31 @@
    6.29      }
    6.30  }
    6.31  
    6.32 +static int touch_active;
    6.33 +static CGPoint start_touch;
    6.34 +extern int use_bump;
    6.35 +
    6.36 +- (void) touchesBegan: (NSSet*) touches withEvent: (UIEvent*) event
    6.37 +{
    6.38 +	UITouch *touch = [[touches allObjects] objectAtIndex: 0];
    6.39 +
    6.40 +	start_touch = [touch locationInView: self];
    6.41 +	touch_active = 1;
    6.42 +}
    6.43 +
    6.44 +- (void) touchesEnded: (NSSet*) touches withEvent: (UIEvent*) event
    6.45 +{
    6.46 +	UITouch *touch = [[touches allObjects] objectAtIndex: 0];
    6.47 +
    6.48 +	CGPoint end_touch = [touch locationInView: self];
    6.49 +	int dx = end_touch.x - start_touch.x;
    6.50 +	int dy = end_touch.y - start_touch.y;
    6.51 +
    6.52 +	if(dx * dx + dy * dy < 30) {
    6.53 +		use_bump = !use_bump;
    6.54 +	}
    6.55 +}
    6.56 +
    6.57  - (void)dealloc
    6.58  {
    6.59      [renderer release];
     7.1 --- a/src/ES2Renderer.h	Thu Sep 08 08:31:15 2011 +0300
     7.2 +++ b/src/ES2Renderer.h	Thu Sep 08 14:52:13 2011 +0300
     7.3 @@ -17,11 +17,10 @@
     7.4      EAGLContext *context;
     7.5  
     7.6      // The pixel dimensions of the CAEAGLLayer
     7.7 -    GLint backingWidth;
     7.8 -    GLint backingHeight;
     7.9 +	int xsz, ysz;
    7.10  
    7.11      // The OpenGL ES names for the framebuffer and renderbuffer used to render to this view
    7.12 -    GLuint defaultFramebuffer, colorRenderbuffer;
    7.13 +	unsigned int fbo, rbuf_color, rbuf_depth;
    7.14  
    7.15      GLuint program;
    7.16  }
     8.1 --- a/src/ES2Renderer.m	Thu Sep 08 08:31:15 2011 +0300
     8.2 +++ b/src/ES2Renderer.m	Thu Sep 08 14:52:13 2011 +0300
     8.3 @@ -1,3 +1,4 @@
     8.4 +#include <assert.h>
     8.5  #import "ES2Renderer.h"
     8.6  #include "istereo.h"
     8.7  
     8.8 @@ -17,11 +18,17 @@
     8.9          }
    8.10  
    8.11          // Create default framebuffer object. The backing will be allocated for the current layer in -resizeFromLayer
    8.12 -        glGenFramebuffers(1, &defaultFramebuffer);
    8.13 -        glGenRenderbuffers(1, &colorRenderbuffer);
    8.14 -        glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);
    8.15 -        glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
    8.16 -        glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer);
    8.17 +        glGenFramebuffers(1, &fbo);
    8.18 +        glBindFramebuffer(GL_FRAMEBUFFER, fbo);
    8.19 +
    8.20 +        glGenRenderbuffers(1, &rbuf_color);
    8.21 +        glBindRenderbuffer(GL_RENDERBUFFER, rbuf_color);
    8.22 +        glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, rbuf_color);
    8.23 +
    8.24 +		glGenRenderbuffers(1, &rbuf_depth);
    8.25 +		glBindRenderbuffer(GL_RENDERBUFFER, rbuf_depth);
    8.26 +		glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rbuf_depth);
    8.27 +		assert(glGetError() == GL_NO_ERROR);
    8.28  
    8.29  		init();
    8.30      }
    8.31 @@ -34,46 +41,51 @@
    8.32  	redraw();
    8.33      // This application only creates a single default framebuffer which is already bound at this point.
    8.34      // This call is redundant, but needed if dealing with multiple framebuffers.
    8.35 -    //glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);
    8.36 -    //glViewport(0, 0, backingWidth, backingHeight);
    8.37 +    //glBindFramebuffer(GL_FRAMEBUFFER, fbo);
    8.38 +    //glViewport(0, 0, xsz, ysz);
    8.39  
    8.40      // This call is redundant, but needed if dealing with multiple renderbuffers.
    8.41 -    //glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
    8.42 +    glBindRenderbuffer(GL_RENDERBUFFER, rbuf_color);
    8.43      [context presentRenderbuffer:GL_RENDERBUFFER];
    8.44  }
    8.45  
    8.46  - (BOOL)resizeFromLayer:(CAEAGLLayer *)layer
    8.47  {
    8.48      // Allocate color buffer backing based on the current layer size
    8.49 -    glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
    8.50 +    glBindRenderbuffer(GL_RENDERBUFFER, rbuf_color);
    8.51      [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:layer];
    8.52 -    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &backingWidth);
    8.53 -    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &backingHeight);
    8.54 +    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &xsz);
    8.55 +    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &ysz);
    8.56 +
    8.57 +	glBindRenderbuffer(GL_RENDERBUFFER, rbuf_depth);
    8.58 +	glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, xsz, ysz);
    8.59  
    8.60      if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
    8.61      {
    8.62          NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER));
    8.63          return NO;
    8.64      }
    8.65 +	assert(glGetError() == GL_NO_ERROR);
    8.66  
    8.67 -	reshape(backingWidth, backingHeight);
    8.68 +	reshape(xsz, ysz);
    8.69  
    8.70      return YES;
    8.71  }
    8.72  
    8.73 +
    8.74  - (void)dealloc
    8.75  {
    8.76      // Tear down GL
    8.77 -    if (defaultFramebuffer)
    8.78 +    if (fbo)
    8.79      {
    8.80 -        glDeleteFramebuffers(1, &defaultFramebuffer);
    8.81 -        defaultFramebuffer = 0;
    8.82 +        glDeleteFramebuffers(1, &fbo);
    8.83 +        fbo = 0;
    8.84      }
    8.85  
    8.86 -    if (colorRenderbuffer)
    8.87 +    if (rbuf_color)
    8.88      {
    8.89 -        glDeleteRenderbuffers(1, &colorRenderbuffer);
    8.90 -        colorRenderbuffer = 0;
    8.91 +        glDeleteRenderbuffers(1, &rbuf_color);
    8.92 +        rbuf_color = 0;
    8.93      }
    8.94  
    8.95      if (program)
     9.1 --- a/src/istereo.c	Thu Sep 08 08:31:15 2011 +0300
     9.2 +++ b/src/istereo.c	Thu Sep 08 14:52:13 2011 +0300
     9.3 @@ -31,7 +31,7 @@
     9.4  #else
     9.5  int stereo = 0;
     9.6  #endif
     9.7 -int use_bump = 1;
     9.8 +int use_bump = 0;
     9.9  
    9.10  /* construction parameters */
    9.11  int sides = 24;
    9.12 @@ -41,7 +41,7 @@
    9.13  float text_period = 13.0;
    9.14  float text_speed = 2.2;
    9.15  
    9.16 -float split = 0.53;
    9.17 +float split = 0.5275;
    9.18  
    9.19  int init(void)
    9.20  {
    9.21 @@ -74,7 +74,8 @@
    9.22  	glEnable(GL_DEPTH_TEST);
    9.23  	glEnable(GL_CULL_FACE);
    9.24  
    9.25 -	cam_fov(45.0);
    9.26 +	cam_fov(42.5);
    9.27 +	cam_clip(0.5, 250.0);
    9.28  
    9.29  	return 0;
    9.30  }
    9.31 @@ -99,6 +100,7 @@
    9.32  		glClearColor(0.6, 0.6, 0.6, 1.0);
    9.33  		tunnel_speed = 0.75;
    9.34  	}
    9.35 +	glClearDepthf(1.0);
    9.36  	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    9.37  
    9.38  	if(stereo) {
    9.39 @@ -156,13 +158,15 @@
    9.40  
    9.41  	draw_tunnel(t);
    9.42  
    9.43 -	glDepthMask(0);
    9.44 -	text_line = floor((text_speed * t) / text_period);
    9.45 -	for(i=0; i<15; i++) {
    9.46 -		vec3_t tpos = calc_text_pos(t - (float)i * 0.01);
    9.47 -		draw_text(text_line, tpos, 1.5 / (float)i);
    9.48 +	if(use_bump) {
    9.49 +		glDepthMask(0);
    9.50 +		text_line = floor((text_speed * t) / text_period);
    9.51 +		for(i=0; i<8; i++) {
    9.52 +			vec3_t tpos = calc_text_pos(t - (float)i * 0.015);
    9.53 +			draw_text(text_line, tpos, 1.5 / (float)i);
    9.54 +		}
    9.55 +		glDepthMask(1);
    9.56  	}
    9.57 -	glDepthMask(1);
    9.58  }
    9.59  
    9.60  static void draw_tunnel(float t)
    9.61 @@ -176,19 +180,22 @@
    9.62  
    9.63  	bind_program(prog);
    9.64  	set_uniform_float(prog, "t", t);
    9.65 -	set_uniform_int(prog, "tex", 0);
    9.66  
    9.67  	if(use_bump) {
    9.68  		vec3_t ltpos = calc_text_pos(t);
    9.69  
    9.70 +		bind_texture(tex_normal, 1);
    9.71  		set_uniform_int(prog, "tex_norm", 1);
    9.72 +		bind_texture(tex_stones, 0);
    9.73 +		set_uniform_int(prog, "tex", 0);
    9.74 +
    9.75  		set_uniform_float4(prog, "light_pos", ltpos.x, ltpos.y, ltpos.z, 1.0);
    9.76  		tang_loc = get_attrib_loc(prog, "attr_tangent");
    9.77 -		bind_texture(tex_normal, 1);
    9.78 +	} else {
    9.79 +		bind_texture(tex, 0);
    9.80 +		set_uniform_int(prog, "tex", 0);
    9.81  	}
    9.82  
    9.83 -	bind_texture(tex, 0);
    9.84 -
    9.85  	gl_matrix_mode(GL_TEXTURE);
    9.86  	gl_load_identity();
    9.87  	gl_translatef(0, -t * tunnel_speed, 0);
    9.88 @@ -206,9 +213,6 @@
    9.89  		float z0 = ring_height * i;
    9.90  		float z1 = ring_height * (i + 1);
    9.91  
    9.92 -		float v0 = (float)i / (float)segm;
    9.93 -		float v1 = (float)(i + 1) / (float)segm;
    9.94 -
    9.95  		worm(t, zp, trans_zp, trans_zp + 1);
    9.96  		worm(t, z0, trans_z0, trans_z0 + 1);
    9.97  		worm(t, z1, trans_z1, trans_z1 + 1);