OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright 2011 The Native Client Authors. All rights reserved. | 2 # Copyright 2011 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can | 3 # Use of this source code is governed by a BSD-style license that can |
4 # be found in the LICENSE file. | 4 # be found in the LICENSE file. |
5 | 5 |
6 # OpenGL ES examples | 6 # OpenGL ES examples |
7 | 7 |
8 Import('env') | 8 Import('env') |
9 | 9 |
10 env.Prepend(CPPDEFINES=['XP_UNIX']) | 10 env.Prepend(CPPDEFINES=['XP_UNIX']) |
11 env.Replace(TEST_DIR='${SOURCE_ROOT}/ppapi/native_client/tests/' + | |
12 'ppapi_gles_book/') | |
13 | 11 |
14 # Underlay $SOURCE_ROOT/gpu in this directory. | 12 # Underlay $SOURCE_ROOT/gpu in this directory. |
15 Dir('.').addRepository(Dir('#/../gpu')) | 13 Dir('.').addRepository(Dir('#/../gpu')) |
16 | 14 |
17 # Underlay $SOURCE_ROOT/third_party/gles2_book in this directory. | 15 # Underlay $SOURCE_ROOT/third_party/gles2_book in this directory. |
18 Dir('.').addRepository(Dir('#/../third_party/gles2_book')) | 16 Dir('.').addRepository(Dir('#/../third_party/gles2_book')) |
19 | 17 |
20 # Don't warn on pointer signedness issues (third_party sources) | 18 # Don't warn on pointer signedness issues (third_party sources) |
21 env.Append(CFLAGS=['-Wno-pointer-sign']) | 19 env.Append(CFLAGS=['-Wno-pointer-sign']) |
22 # ..and don't warn about missing braces | 20 # ..and don't warn about missing braces |
(...skipping 29 matching lines...) Expand all Loading... |
52 'Chapter_8/Simple_VertexShader/Simple_VertexShader.c'], | 50 'Chapter_8/Simple_VertexShader/Simple_VertexShader.c'], |
53 'stencil_test': [ | 51 'stencil_test': [ |
54 'Chapter_11/Stencil_Test/Stencil_Test.c'], | 52 'Chapter_11/Stencil_Test/Stencil_Test.c'], |
55 'texture_wrap': [ | 53 'texture_wrap': [ |
56 'Chapter_9/TextureWrap/TextureWrap.c'], | 54 'Chapter_9/TextureWrap/TextureWrap.c'], |
57 } | 55 } |
58 | 56 |
59 for demo, sources in gles_book_examples.iteritems(): | 57 for demo, sources in gles_book_examples.iteritems(): |
60 nexe_name = ('ppapi_gles_book_%s_%s' | 58 nexe_name = ('ppapi_gles_book_%s_%s' |
61 % (demo, env.get('TARGET_FULLARCH'))) | 59 % (demo, env.get('TARGET_FULLARCH'))) |
62 nmf_name = '${TEST_DIR}/ppapi_gles_book_' + demo + '.nmf' | 60 nmf_name = 'ppapi_gles_book_' + demo + '.nmf' |
63 nexe = env.ComponentProgram( | 61 nexe = env.ComponentProgram( |
64 nexe_name, | 62 nexe_name, |
65 ['demos/gles2_book/demo_' + demo + '.cc'] + sources, | 63 ['demos/gles2_book/demo_' + demo + '.cc'] + sources, |
66 EXTRA_LIBS=['${PPAPI_LIBS}', | 64 EXTRA_LIBS=['${PPAPI_LIBS}', |
67 'ppapi_cpp', | 65 'ppapi_cpp', |
68 'ppapi_gles_demo', | 66 'ppapi_gles_demo', |
69 'ppapi_cpp', | 67 'ppapi_cpp', |
70 'ppapi_gles2', | 68 'ppapi_gles2', |
71 'm']) | 69 'm']) |
72 env.Publish(nexe_name, 'run', | 70 env.Publish(nexe_name, 'run', |
73 ['ppapi_gles_book.html']) | 71 ['ppapi_gles_book.html', |
| 72 nmf_name]) |
74 test = env.PPAPIBrowserTester( | 73 test = env.PPAPIBrowserTester( |
75 'ppapi_gles_book_' + demo + '.out', | 74 'ppapi_gles_book_' + demo + '.out', |
76 url='ppapi_gles_book.html?manifest=' + nmf_name, | 75 url='ppapi_gles_book.html?manifest=' + nmf_name, |
77 nmf=nmf_name, | |
78 files=[nexe, | 76 files=[nexe, |
79 env.File(nmf_name), | 77 env.File(nmf_name), |
80 env.File('ppapi_gles_book.html')], | 78 env.File('ppapi_gles_book.html')], |
81 browser_flags=['--enable-accelerated-plugins']) | 79 browser_flags=['--enable-accelerated-plugins']) |
82 env.AddNodeToTestSuite( | 80 env.AddNodeToTestSuite( |
83 test, | 81 test, |
84 ['chrome_browser_tests'], | 82 ['chrome_browser_tests'], |
85 'run_ppapi_gles_book_' + demo + '_test', | 83 'run_ppapi_gles_book_' + demo + '_test', |
86 is_broken=env.PPAPIBrowserTesterIsBroken() or | 84 is_broken=env.PPAPIBrowserTesterIsBroken() or |
87 env.PPAPIGraphics3DIsBroken()) | 85 env.PPAPIGraphics3DIsBroken()) |
OLD | NEW |