Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -crB glmark2-2012.03.orig/src/texture.cpp glmark2-2012.03.rpi/src/texture.cpp
- *** glmark2-2012.03.orig/src/texture.cpp 2012-05-12 22:53:23.512510201 +0100
- --- glmark2-2012.03.rpi/src/texture.cpp 2012-05-12 22:53:44.102407251 +0100
- ***************
- *** 78,84 ****
- }
- /* Read the image information and data */
- ! png_set_read_fn(png_, reinterpret_cast<voidp>(is_ptr.get()), png_read_fn);
- png_read_png(png_, info_, png_transforms, 0);
- --- 78,84 ----
- }
- /* Read the image information and data */
- ! png_set_read_fn(png_, reinterpret_cast<png_voidp>(is_ptr.get()), png_read_fn);
- png_read_png(png_, info_, png_transforms, 0);
- diff -crB glmark2-2012.03.orig/src/wscript_build glmark2-2012.03.rpi/src/wscript_build
- *** glmark2-2012.03.orig/src/wscript_build 2012-01-28 11:37:01.000000000 +0000
- --- glmark2-2012.03.rpi/src/wscript_build 2012-05-12 22:57:17.921338151 +0100
- ***************
- *** 3,8 ****
- --- 3,9 ----
- f.name.find('android') == -1 ]
- gl_sources = ['canvas-x11.cpp', 'canvas-x11-glx.cpp']
- glesv2_sources = ['canvas-x11.cpp', 'canvas-x11-egl.cpp']
- + rpi_sources = ['canvas-rpi.cpp']
- libmatrix_sources = [f for f in bld.path.ant_glob('libmatrix/*.cc')
- if not f.name.endswith('test.cc')]
- ***************
- *** 20,26 ****
- features = ['cxx', 'cprogram'],
- source = common_sources + gl_sources,
- target = 'glmark2',
- ! use = ['x11', 'gl', 'matrix', 'libpng12'],
- lib = ['m'],
- defines = ['USE_GL', 'USE_EXCEPTIONS']
- )
- --- 21,27 ----
- features = ['cxx', 'cprogram'],
- source = common_sources + gl_sources,
- target = 'glmark2',
- ! use = ['x11', 'gl', 'matrix', 'libpng'],
- lib = ['m'],
- defines = ['USE_GL', 'USE_EXCEPTIONS']
- )
- ***************
- *** 39,45 ****
- features = ['cxx', 'cprogram'],
- source = common_sources + glesv2_sources,
- target = 'glmark2-es2',
- ! use = ['x11', 'egl', 'glesv2', 'matrix-es2', 'libpng12'],
- lib = ['m', 'dl'],
- defines = ['USE_GLESv2', 'USE_EXCEPTIONS']
- )
- --- 40,65 ----
- features = ['cxx', 'cprogram'],
- source = common_sources + glesv2_sources,
- target = 'glmark2-es2',
- ! use = ['x11', 'egl', 'glesv2', 'matrix-es2', 'libpng'],
- ! lib = ['m', 'dl'],
- ! defines = ['USE_GLESv2', 'USE_EXCEPTIONS']
- ! )
- !
- ! if bld.env.USE_RPi:
- ! bld(
- ! features = ['cxx', 'cxxstlib'],
- ! source = libmatrix_sources,
- ! target = 'matrix-es2',
- ! lib = ['m'],
- ! includes = ['.'],
- ! export_includes = 'libmatrix',
- ! defines = ['USE_GLESv2', 'USE_EXCEPTIONS']
- ! )
- ! bld(
- ! features = ['cxx', 'cprogram'],
- ! source = common_sources + rpi_sources,
- ! target = 'glmark2-rpi',
- ! use = ['egl', 'glesv2', 'matrix-es2', 'libpng'],
- lib = ['m', 'dl'],
- defines = ['USE_GLESv2', 'USE_EXCEPTIONS']
- )
- diff -crB glmark2-2012.03.orig/wscript glmark2-2012.03.rpi/wscript
- *** glmark2-2012.03.orig/wscript 2012-03-22 09:40:47.000000000 +0000
- --- glmark2-2012.03.rpi/wscript 2012-05-12 22:28:26.979992900 +0100
- ***************
- *** 19,24 ****
- --- 19,26 ----
- default = False, help='build using OpenGL 2.0')
- opt.add_option('--enable-glesv2', action='store_true', dest = 'glesv2',
- default = False, help='build using OpenGL ES 2.0')
- + opt.add_option('--enable-rpi', action='store_true', dest = 'rpi',
- + default = False, help='build to use on RaspberryPi')
- opt.add_option('--no-debug', action='store_false', dest = 'debug',
- default = True, help='disable compiler debug information')
- opt.add_option('--no-opt', action='store_false', dest = 'opt',
- ***************
- *** 29,36 ****
- help='path to additional data (models, shaders, textures)')
- def configure(ctx):
- ! if not Options.options.gl and not Options.options.glesv2:
- ! ctx.fatal("You must configure using at least one of --enable-gl, --enable-glesv2")
- ctx.check_tool('compiler_cc')
- ctx.check_tool('compiler_cxx')
- --- 31,38 ----
- help='path to additional data (models, shaders, textures)')
- def configure(ctx):
- ! if not Options.options.gl and not Options.options.glesv2 and not Options.options.rpi:
- ! ctx.fatal("You must configure using at least one of --enable-gl, --enable-glesv2, --enable-rpi")
- ctx.check_tool('compiler_cc')
- ctx.check_tool('compiler_cxx')
- ***************
- *** 52,58 ****
- uselib = uselib, mandatory = True)
- # Check required packages
- ! req_pkgs = [('x11', 'x11'), ('libpng12', 'libpng12')]
- for (pkg, uselib) in req_pkgs:
- ctx.check_cfg(package = pkg, uselib_store = uselib,
- args = '--cflags --libs', mandatory = True)
- --- 54,62 ----
- uselib = uselib, mandatory = True)
- # Check required packages
- ! req_pkgs = [('libpng', 'libpng')]
- ! if not Options.options.rpi:
- ! req_pkgs.append(('x11', 'x11'))
- for (pkg, uselib) in req_pkgs:
- ctx.check_cfg(package = pkg, uselib_store = uselib,
- args = '--cflags --libs', mandatory = True)
- ***************
- *** 60,66 ****
- # Check optional packages
- opt_pkgs = [('gl', 'gl', Options.options.gl),
- ('egl', 'egl', Options.options.glesv2),
- ! ('glesv2', 'glesv2', Options.options.glesv2)]
- for (pkg, uselib, mandatory) in opt_pkgs:
- ctx.check_cfg(package = pkg, uselib_store = uselib,
- args = '--cflags --libs', mandatory = mandatory)
- --- 64,71 ----
- # Check optional packages
- opt_pkgs = [('gl', 'gl', Options.options.gl),
- ('egl', 'egl', Options.options.glesv2),
- ! ('glesv2', 'glesv2', Options.options.glesv2),
- ! ('glesv2', 'glesv2', Options.options.rpi)]
- for (pkg, uselib, mandatory) in opt_pkgs:
- ctx.check_cfg(package = pkg, uselib_store = uselib,
- args = '--cflags --libs', mandatory = mandatory)
- ***************
- *** 90,95 ****
- --- 95,101 ----
- ctx.env.USE_GL = Options.options.gl
- ctx.env.USE_GLESv2 = Options.options.glesv2
- + ctx.env.USE_RPi = Options.options.rpi
- ctx.msg("Prefix", ctx.env.PREFIX, color = 'PINK')
- ctx.msg("Data path", Options.options.data_path, color = 'PINK')
- ***************
- *** 101,106 ****
- --- 107,114 ----
- color = 'PINK')
- ctx.msg("Building GLESv2 version", "Yes" if ctx.env.USE_GLESv2 else "No",
- color = 'PINK')
- + ctx.msg("Building RPi version", "Yes" if ctx.env.USE_RPi else "No",
- + color = 'PINK')
- def build(ctx):
- ctx.recurse('src')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement