Advertisement
Guest User

Untitled

a guest
May 12th, 2012
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.22 KB | None | 0 0
  1. diff -crB glmark2-2012.03.orig/src/texture.cpp glmark2-2012.03.rpi/src/texture.cpp
  2. *** glmark2-2012.03.orig/src/texture.cpp 2012-05-12 22:53:23.512510201 +0100
  3. --- glmark2-2012.03.rpi/src/texture.cpp 2012-05-12 22:53:44.102407251 +0100
  4. ***************
  5. *** 78,84 ****
  6. }
  7.  
  8. /* Read the image information and data */
  9. ! png_set_read_fn(png_, reinterpret_cast<voidp>(is_ptr.get()), png_read_fn);
  10.  
  11. png_read_png(png_, info_, png_transforms, 0);
  12.  
  13. --- 78,84 ----
  14. }
  15.  
  16. /* Read the image information and data */
  17. ! png_set_read_fn(png_, reinterpret_cast<png_voidp>(is_ptr.get()), png_read_fn);
  18.  
  19. png_read_png(png_, info_, png_transforms, 0);
  20.  
  21. diff -crB glmark2-2012.03.orig/src/wscript_build glmark2-2012.03.rpi/src/wscript_build
  22. *** glmark2-2012.03.orig/src/wscript_build 2012-01-28 11:37:01.000000000 +0000
  23. --- glmark2-2012.03.rpi/src/wscript_build 2012-05-12 22:57:17.921338151 +0100
  24. ***************
  25. *** 3,8 ****
  26. --- 3,9 ----
  27. f.name.find('android') == -1 ]
  28. gl_sources = ['canvas-x11.cpp', 'canvas-x11-glx.cpp']
  29. glesv2_sources = ['canvas-x11.cpp', 'canvas-x11-egl.cpp']
  30. + rpi_sources = ['canvas-rpi.cpp']
  31. libmatrix_sources = [f for f in bld.path.ant_glob('libmatrix/*.cc')
  32. if not f.name.endswith('test.cc')]
  33.  
  34. ***************
  35. *** 20,26 ****
  36. features = ['cxx', 'cprogram'],
  37. source = common_sources + gl_sources,
  38. target = 'glmark2',
  39. ! use = ['x11', 'gl', 'matrix', 'libpng12'],
  40. lib = ['m'],
  41. defines = ['USE_GL', 'USE_EXCEPTIONS']
  42. )
  43. --- 21,27 ----
  44. features = ['cxx', 'cprogram'],
  45. source = common_sources + gl_sources,
  46. target = 'glmark2',
  47. ! use = ['x11', 'gl', 'matrix', 'libpng'],
  48. lib = ['m'],
  49. defines = ['USE_GL', 'USE_EXCEPTIONS']
  50. )
  51. ***************
  52. *** 39,45 ****
  53. features = ['cxx', 'cprogram'],
  54. source = common_sources + glesv2_sources,
  55. target = 'glmark2-es2',
  56. ! use = ['x11', 'egl', 'glesv2', 'matrix-es2', 'libpng12'],
  57. lib = ['m', 'dl'],
  58. defines = ['USE_GLESv2', 'USE_EXCEPTIONS']
  59. )
  60. --- 40,65 ----
  61. features = ['cxx', 'cprogram'],
  62. source = common_sources + glesv2_sources,
  63. target = 'glmark2-es2',
  64. ! use = ['x11', 'egl', 'glesv2', 'matrix-es2', 'libpng'],
  65. ! lib = ['m', 'dl'],
  66. ! defines = ['USE_GLESv2', 'USE_EXCEPTIONS']
  67. ! )
  68. !
  69. ! if bld.env.USE_RPi:
  70. ! bld(
  71. ! features = ['cxx', 'cxxstlib'],
  72. ! source = libmatrix_sources,
  73. ! target = 'matrix-es2',
  74. ! lib = ['m'],
  75. ! includes = ['.'],
  76. ! export_includes = 'libmatrix',
  77. ! defines = ['USE_GLESv2', 'USE_EXCEPTIONS']
  78. ! )
  79. ! bld(
  80. ! features = ['cxx', 'cprogram'],
  81. ! source = common_sources + rpi_sources,
  82. ! target = 'glmark2-rpi',
  83. ! use = ['egl', 'glesv2', 'matrix-es2', 'libpng'],
  84. lib = ['m', 'dl'],
  85. defines = ['USE_GLESv2', 'USE_EXCEPTIONS']
  86. )
  87. diff -crB glmark2-2012.03.orig/wscript glmark2-2012.03.rpi/wscript
  88. *** glmark2-2012.03.orig/wscript 2012-03-22 09:40:47.000000000 +0000
  89. --- glmark2-2012.03.rpi/wscript 2012-05-12 22:28:26.979992900 +0100
  90. ***************
  91. *** 19,24 ****
  92. --- 19,26 ----
  93. default = False, help='build using OpenGL 2.0')
  94. opt.add_option('--enable-glesv2', action='store_true', dest = 'glesv2',
  95. default = False, help='build using OpenGL ES 2.0')
  96. + opt.add_option('--enable-rpi', action='store_true', dest = 'rpi',
  97. + default = False, help='build to use on RaspberryPi')
  98. opt.add_option('--no-debug', action='store_false', dest = 'debug',
  99. default = True, help='disable compiler debug information')
  100. opt.add_option('--no-opt', action='store_false', dest = 'opt',
  101. ***************
  102. *** 29,36 ****
  103. help='path to additional data (models, shaders, textures)')
  104.  
  105. def configure(ctx):
  106. ! if not Options.options.gl and not Options.options.glesv2:
  107. ! ctx.fatal("You must configure using at least one of --enable-gl, --enable-glesv2")
  108.  
  109. ctx.check_tool('compiler_cc')
  110. ctx.check_tool('compiler_cxx')
  111. --- 31,38 ----
  112. help='path to additional data (models, shaders, textures)')
  113.  
  114. def configure(ctx):
  115. ! if not Options.options.gl and not Options.options.glesv2 and not Options.options.rpi:
  116. ! ctx.fatal("You must configure using at least one of --enable-gl, --enable-glesv2, --enable-rpi")
  117.  
  118. ctx.check_tool('compiler_cc')
  119. ctx.check_tool('compiler_cxx')
  120. ***************
  121. *** 52,58 ****
  122. uselib = uselib, mandatory = True)
  123.  
  124. # Check required packages
  125. ! req_pkgs = [('x11', 'x11'), ('libpng12', 'libpng12')]
  126. for (pkg, uselib) in req_pkgs:
  127. ctx.check_cfg(package = pkg, uselib_store = uselib,
  128. args = '--cflags --libs', mandatory = True)
  129. --- 54,62 ----
  130. uselib = uselib, mandatory = True)
  131.  
  132. # Check required packages
  133. ! req_pkgs = [('libpng', 'libpng')]
  134. ! if not Options.options.rpi:
  135. ! req_pkgs.append(('x11', 'x11'))
  136. for (pkg, uselib) in req_pkgs:
  137. ctx.check_cfg(package = pkg, uselib_store = uselib,
  138. args = '--cflags --libs', mandatory = True)
  139. ***************
  140. *** 60,66 ****
  141. # Check optional packages
  142. opt_pkgs = [('gl', 'gl', Options.options.gl),
  143. ('egl', 'egl', Options.options.glesv2),
  144. ! ('glesv2', 'glesv2', Options.options.glesv2)]
  145. for (pkg, uselib, mandatory) in opt_pkgs:
  146. ctx.check_cfg(package = pkg, uselib_store = uselib,
  147. args = '--cflags --libs', mandatory = mandatory)
  148. --- 64,71 ----
  149. # Check optional packages
  150. opt_pkgs = [('gl', 'gl', Options.options.gl),
  151. ('egl', 'egl', Options.options.glesv2),
  152. ! ('glesv2', 'glesv2', Options.options.glesv2),
  153. ! ('glesv2', 'glesv2', Options.options.rpi)]
  154. for (pkg, uselib, mandatory) in opt_pkgs:
  155. ctx.check_cfg(package = pkg, uselib_store = uselib,
  156. args = '--cflags --libs', mandatory = mandatory)
  157. ***************
  158. *** 90,95 ****
  159. --- 95,101 ----
  160.  
  161. ctx.env.USE_GL = Options.options.gl
  162. ctx.env.USE_GLESv2 = Options.options.glesv2
  163. + ctx.env.USE_RPi = Options.options.rpi
  164.  
  165. ctx.msg("Prefix", ctx.env.PREFIX, color = 'PINK')
  166. ctx.msg("Data path", Options.options.data_path, color = 'PINK')
  167. ***************
  168. *** 101,106 ****
  169. --- 107,114 ----
  170. color = 'PINK')
  171. ctx.msg("Building GLESv2 version", "Yes" if ctx.env.USE_GLESv2 else "No",
  172. color = 'PINK')
  173. + ctx.msg("Building RPi version", "Yes" if ctx.env.USE_RPi else "No",
  174. + color = 'PINK')
  175.  
  176. def build(ctx):
  177. ctx.recurse('src')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement