@@ -1839,19 +1839,19 @@ def test_glbook(self):
18391839 'Chapter_13/ParticleSystem/CH13_ParticleSystem.o' ,
18401840 ], configure = None )
18411841
1842- def book_path (* pathelems ):
1843- return test_file ('third_party/glbook' , * pathelems )
1842+ def book_path (path ):
1843+ return test_file ('third_party/glbook' , path )
18441844
18451845 for program in programs :
18461846 print (program )
18471847 basename = os .path .basename (program )
18481848 args = ['-lGL' , '-lEGL' , '-lX11' ]
18491849 if basename == 'CH10_MultiTexture.o' :
1850- shutil .copyfile (book_path ('Chapter_10' , ' MultiTexture' , ' basemap.tga' ), 'basemap.tga' )
1851- shutil .copyfile (book_path ('Chapter_10' , ' MultiTexture' , ' lightmap.tga' ), 'lightmap.tga' )
1850+ shutil .copyfile (book_path ('Chapter_10/ MultiTexture/ basemap.tga' ), 'basemap.tga' )
1851+ shutil .copyfile (book_path ('Chapter_10/ MultiTexture/ lightmap.tga' ), 'lightmap.tga' )
18521852 args += ['--preload-file' , 'basemap.tga' , '--preload-file' , 'lightmap.tga' ]
18531853 elif basename == 'CH13_ParticleSystem.o' :
1854- shutil .copyfile (book_path ('Chapter_13' , ' ParticleSystem' , ' smoke.tga' ), 'smoke.tga' )
1854+ shutil .copyfile (book_path ('Chapter_13/ ParticleSystem/ smoke.tga' ), 'smoke.tga' )
18551855 args += ['--preload-file' , 'smoke.tga' , '-O2' ] # test optimizations and closure here as well for more coverage
18561856
18571857 self .btest (program ,
@@ -1865,23 +1865,22 @@ def book_path(*pathelems):
18651865 'full_es3' : (['-sFULL_ES3' ],)
18661866 })
18671867 def test_gles2_emulation (self , args ):
1868- print (args )
18691868 shutil .copyfile (test_file ('third_party/glbook/Chapter_10/MultiTexture/basemap.tga' ), 'basemap.tga' )
18701869 shutil .copyfile (test_file ('third_party/glbook/Chapter_10/MultiTexture/lightmap.tga' ), 'lightmap.tga' )
18711870 shutil .copyfile (test_file ('third_party/glbook/Chapter_13/ParticleSystem/smoke.tga' ), 'smoke.tga' )
18721871
18731872 for source , reference in [
1874- (Path ( 'third_party/glbook/Chapter_2' , ' Hello_Triangle' , ' Hello_Triangle_orig.c'), test_file ( 'third_party/glbook/CH02_HelloTriangle.png' ) ),
1875- # (Path( 'third_party/glbook/Chapter_8', ' Simple_VertexShader', ' Simple_VertexShader_orig.c'), test_file( 'third_party/glbook/CH08_SimpleVertexShader.png') ), # XXX needs INT extension in WebGL
1876- (Path ( 'third_party/glbook/Chapter_9' , ' TextureWrap' , ' TextureWrap_orig.c'), test_file ( 'third_party/glbook/CH09_TextureWrap.png' ) ),
1877- # (Path( 'third_party/glbook/Chapter_9', ' Simple_TextureCubemap', ' Simple_TextureCubemap_orig.c'), test_file( 'third_party/glbook/CH09_TextureCubemap.png') ), # XXX needs INT extension in WebGL
1878- (Path ( 'third_party/glbook/Chapter_9' , ' Simple_Texture2D' , ' Simple_Texture2D_orig.c'), test_file ( 'third_party/glbook/CH09_SimpleTexture2D.png' ) ),
1879- (Path ( 'third_party/glbook/Chapter_10' , ' MultiTexture' , ' MultiTexture_orig.c'), test_file ( 'third_party/glbook/CH10_MultiTexture.png' ) ),
1880- (Path ( 'third_party/glbook/Chapter_13' , ' ParticleSystem' , ' ParticleSystem_orig.c'), test_file ( 'third_party/glbook/CH13_ParticleSystem.png' ) ),
1873+ ('third_party/glbook/Chapter_2/ Hello_Triangle/ Hello_Triangle_orig.c' , 'third_party/glbook/CH02_HelloTriangle.png' ),
1874+ # ('third_party/glbook/Chapter_8/ Simple_VertexShader/ Simple_VertexShader_orig.c', 'third_party/glbook/CH08_SimpleVertexShader.png'), # XXX needs INT extension in WebGL
1875+ ('third_party/glbook/Chapter_9/ TextureWrap/ TextureWrap_orig.c' , 'third_party/glbook/CH09_TextureWrap.png' ),
1876+ # ('third_party/glbook/Chapter_9/ Simple_TextureCubemap/ Simple_TextureCubemap_orig.c', 'third_party/glbook/CH09_TextureCubemap.png'), # XXX needs INT extension in WebGL
1877+ ('third_party/glbook/Chapter_9/ Simple_Texture2D/ Simple_Texture2D_orig.c' , 'third_party/glbook/CH09_SimpleTexture2D.png' ),
1878+ ('third_party/glbook/Chapter_10/ MultiTexture/ MultiTexture_orig.c' , 'third_party/glbook/CH10_MultiTexture.png' ),
1879+ ('third_party/glbook/Chapter_13/ ParticleSystem/ ParticleSystem_orig.c' , 'third_party/glbook/CH13_ParticleSystem.png' ),
18811880 ]:
18821881 print (source )
18831882 self .btest (source ,
1884- reference = reference ,
1883+ reference = test_file ( reference ) ,
18851884 args = ['-I' + test_file ('third_party/glbook/Common' ),
18861885 test_file ('third_party/glbook/Common/esUtil.c' ),
18871886 test_file ('third_party/glbook/Common/esShader.c' ),
0 commit comments