Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(806)

Unified Diff: ppapi/native_client/tests/ppapi_gles_book/nacl.scons

Issue 7740013: Cloning a bunch of stuff from the native_client repository at r6528 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/native_client/tests/ppapi_gles_book/nacl.scons
===================================================================
--- ppapi/native_client/tests/ppapi_gles_book/nacl.scons (revision 0)
+++ ppapi/native_client/tests/ppapi_gles_book/nacl.scons (revision 0)
@@ -0,0 +1,85 @@
+# -*- python -*-
+# Copyright 2011 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can
+# be found in the LICENSE file.
+
+# OpenGL ES examples
+
+Import('env')
+
+env.Prepend(CPPDEFINES=['XP_UNIX'])
+
+# Underlay $SOURCE_ROOT/gpu in this directory.
+Dir('.').addRepository(Dir('#/../gpu'))
+
+# Underlay $SOURCE_ROOT/third_party/gles2_book in this directory.
+Dir('.').addRepository(Dir('#/../third_party/gles2_book'))
+
+# Don't warn on pointer signedness issues (third_party sources)
+env.Append(CFLAGS=['-Wno-pointer-sign'])
+# ..and don't warn about missing braces
+env.Append(CCFLAGS=['-Wno-missing-braces'])
+
+# Add local path to find GPU sources and GLES2 includes.
+env.Append(CPPPATH=[
+ '$SOURCE_ROOT/third_party/gles2_book/Common/Include',
+ '$SOURCE_ROOT/ppapi/lib/gl/include',
+ ])
+
+gles_demo_srcs = [
+ 'Common/Source/esShader.c',
+ 'Common/Source/esShapes.c',
+ 'Common/Source/esTransform.c',
+ 'Common/Source/esUtil.c',
+ 'demos/framework/demo.cc',
+ 'demos/framework/pepper.cc',
+ ]
+
+env.ComponentLibrary('ppapi_gles_demo', gles_demo_srcs)
+
+gles_book_examples = {
+ 'hello_triangle': [
+ 'Chapter_2/Hello_Triangle/Hello_Triangle.c'],
+ 'mip_map_2d': [
+ 'Chapter_9/MipMap2D/MipMap2D.c'],
+ 'simple_texture_2d': [
+ 'Chapter_9/Simple_Texture2D/Simple_Texture2D.c'],
+ 'simple_texture_cubemap': [
+ 'Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.c'],
+ 'simple_vertex_shader': [
+ 'Chapter_8/Simple_VertexShader/Simple_VertexShader.c'],
+ 'stencil_test': [
+ 'Chapter_11/Stencil_Test/Stencil_Test.c'],
+ 'texture_wrap': [
+ 'Chapter_9/TextureWrap/TextureWrap.c'],
+}
+
+for demo, sources in gles_book_examples.iteritems():
+ nexe_name = ('ppapi_gles_book_%s_%s'
+ % (demo, env.get('TARGET_FULLARCH')))
+ nmf_name = 'ppapi_gles_book_' + demo + '.nmf'
+ nexe = env.ComponentProgram(
+ nexe_name,
+ ['demos/gles2_book/demo_' + demo + '.cc'] + sources,
+ EXTRA_LIBS=['${PPAPI_LIBS}',
+ 'ppapi_cpp',
+ 'ppapi_gles_demo',
+ 'ppapi_cpp',
+ 'ppapi_gles2',
+ 'm'])
+ env.Publish(nexe_name, 'run',
+ ['ppapi_gles_book.html',
+ nmf_name])
+ test = env.PPAPIBrowserTester(
+ 'ppapi_gles_book_' + demo + '.out',
+ url='ppapi_gles_book.html?manifest=' + nmf_name,
+ files=[nexe,
+ env.File(nmf_name),
+ env.File('ppapi_gles_book.html')],
+ browser_flags=['--enable-accelerated-plugins'])
+ env.AddNodeToTestSuite(
+ test,
+ ['chrome_browser_tests'],
+ 'run_ppapi_gles_book_' + demo + '_test',
+ is_broken=env.PPAPIBrowserTesterIsBroken() or
+ env.PPAPIGraphics3DIsBroken())

Powered by Google App Engine
This is Rietveld 408576698