Changeset 1082
- Timestamp:
- Nov 21, 2011, 1:49:47 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.gitignore
r1054 r1082 7 7 *.elf 8 8 *.self 9 *.nexe 9 10 *.userprefs 10 11 *.usertasks -
trunk/build/lol-build
r1025 r1082 16 16 # - linux-i386 17 17 # - linux-amd64 18 # - nacl-amd64 18 19 # - ios-arm 19 20 # - osx-amd64 … … 118 119 cd monsterz/android 119 120 android update project --path . 121 ;; 122 nacl-amd64) 123 # no need for "-u _ZN2pp12CreateModuleEv" but it could be helpful 124 ./configure CXX=x86_64-nacl-g++ CC=x86_64-nacl-gcc ac_cv_exeext=.nexe --host=none LOL_LIBS="-lppapi -lppapi_gles2 -lppapi_cpp" 120 125 ;; 121 126 ps3-ppu) … … 179 184 ps3-ppu) 180 185 ;; 186 nacl-*) 187 ;; 181 188 windows-i386) 182 189 # If neither $MSYSTEM or $DISPLAY are set, and xvfb-run -
trunk/configure.ac
r1043 r1082 129 129 GL_LIBS="${GL_LIBS} ${GLES2_LIBS}"], 130 130 [:]) 131 AC_CHECK_HEADER(GLES2/gl2.h, 132 [AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available) 133 ac_cv_my_have_gl="yes"]) 131 134 132 135 PKG_CHECK_MODULES(GL, gl, … … 153 156 AC_CHECK_HEADER(PSGL/psgl.h, 154 157 [ac_cv_my_have_gl="yes"]) 158 155 159 if test "${ac_cv_my_have_gl}" = "no"; then 156 160 AC_MSG_ERROR([[No OpenGL or OpenGL ES implementation found]]) -
trunk/src/Makefile.am
r1053 r1082 20 20 \ 21 21 $(ps3_sources) \ 22 $(nacl_sources) \ 22 23 $(sdl_sources) \ 23 24 \ … … 39 40 liblol_a_CPPFLAGS = @LOL_CFLAGS@ 40 41 41 sdl_sources = 42 sdl_sources = \ 42 43 platform/sdl/sdlapp.cpp platform/sdl/sdlapp.h \ 43 44 platform/sdl/sdlinput.cpp platform/sdl/sdlinput.h 45 46 nacl_sources = \ 47 platform/nacl/naclapp.cpp platform/nacl/naclapp.h 44 48 45 49 if HAVE_PS3 -
trunk/src/application/application.cpp
r1063 r1082 18 18 #if defined __CELLOS_LV2__ 19 19 # include "platform/ps3/ps3app.h" 20 #elif defined __native_client__ 21 # include "platform/nacl/naclapp.h" 20 22 #elif defined HAVE_GLES_2X 21 23 # include "eglapp.h" … … 40 42 #if defined __CELLOS_LV2__ 41 43 Ps3App app; 44 #elif defined __native_client__ 45 NaClApp app; 42 46 #elif defined HAVE_GLES_2X 43 47 /* FIXME: this macro is only deactivated if we include "lolgl.h" */ -
trunk/src/debug/quad.cpp
r1051 r1082 154 154 if (!data->initialised && !IsDestroying()) 155 155 { 156 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ 156 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 157 157 glGenVertexArrays(NUM_ARRAYS, data->array); 158 158 #endif … … 184 184 else if (data->initialised && IsDestroying()) 185 185 { 186 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ 186 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 187 187 glDeleteVertexArrays(NUM_ARRAYS, data->array); 188 188 #endif … … 495 495 * Renders an orange square. 496 496 */ 497 #if !defined __ANDROID__ && !defined __APPLE__ 497 #if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 498 498 glColor4f(orange.x, orange.y, orange.z, orange.w); 499 499 glEnableClientState(GL_VERTEX_ARRAY); … … 513 513 * Renders a green sine wave made of 1-pixel points. 514 514 */ 515 #if !defined __ANDROID__ && !defined __APPLE__ 515 #if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 516 516 glColor4f(0.0f, 1.0f, 0.0f, 1.0f); 517 517 glPointSize(1.0f); … … 532 532 * Renders a multicoloured square with varying colors. 533 533 */ 534 #if !defined __ANDROID__ && !defined __APPLE__ 534 #if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 535 535 glEnableClientState(GL_VERTEX_ARRAY); 536 536 glEnableClientState(GL_COLOR_ARRAY); … … 553 553 * animated distorted checkerboard. 554 554 */ 555 #if !defined __ANDROID__ && !defined __APPLE__ 555 #if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 556 556 glEnable(GL_TEXTURE_2D); 557 557 glBindTexture(GL_TEXTURE_2D, data->texture[0]); … … 581 581 * Renders an orange square. 582 582 */ 583 #if !defined __ANDROID__ && !defined __APPLE__ 583 #if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 584 584 if (!shader[0]) 585 585 #if !defined __CELLOS_LV2__ … … 627 627 * Renders an orange square. 628 628 */ 629 #if !defined __ANDROID__ && !defined __APPLE__ 629 #if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 630 630 if (!shader[0]) 631 631 { … … 680 680 * Renders a static, coloured and tiled pattern. 681 681 */ 682 #if !defined __ANDROID__ && !defined __APPLE__ 682 #if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 683 683 if (!shader[0]) 684 684 #if !defined __CELLOS_LV2__ … … 733 733 * Renders a multicoloured square with varying colors. 734 734 */ 735 #if !defined __ANDROID__ && !defined __APPLE__ 735 #if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 736 736 if (!shader[0]) 737 737 { … … 797 797 * Renders an antialiased green sine wave made of 1-pixel points. 798 798 */ 799 #if !defined __ANDROID__ && !defined __APPLE__ && !defined __CELLOS_LV2__ 799 #if !defined __ANDROID__ && !defined __APPLE__ && !defined __CELLOS_LV2__ && !defined __native_client__ 800 800 if (!shader[0]) 801 801 shader[0] = Shader::Create( … … 843 843 * animated distorted checkerboard. 844 844 */ 845 #if !defined __ANDROID__ && !defined __APPLE__ 845 #if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 846 846 if (!shader[0]) 847 847 #if !defined __CELLOS_LV2__ … … 916 916 * animated distorted checkerboard. 917 917 */ 918 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ 918 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 919 919 if (!shader[0]) 920 920 { … … 986 986 * animated distorted checkerboard. 987 987 */ 988 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ 988 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 989 989 if (!shader[0]) 990 990 { … … 1074 1074 #endif 1075 1075 1076 #if !defined __ANDROID__ && !defined __APPLE__ 1076 #if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 1077 1077 glColor4f(1.0f, 1.0f, 1.0f, 1.0f); 1078 1078 #endif … … 1083 1083 glClientActiveTexture(GL_TEXTURE0); 1084 1084 #endif 1085 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ 1085 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 1086 1086 glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_FALSE); 1087 1087 #endif … … 1089 1089 1090 1090 glDisable(GL_BLEND); 1091 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ 1091 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 1092 1092 glDisable(GL_POINT_SPRITE); 1093 1093 #endif … … 1101 1101 #endif 1102 1102 1103 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ 1103 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ 1104 1104 glDisable(GL_VERTEX_PROGRAM_POINT_SIZE); 1105 1105 #endif -
trunk/src/real.h
r1029 r1082 18 18 19 19 #include <stdint.h> 20 21 /* Avoid issues with NaCl headers */ 22 #undef log2 20 23 21 24 namespace lol -
trunk/src/timer.cpp
r968 r1082 16 16 #include <stdint.h> 17 17 18 #if defined __linux__ || defined __ APPLE__18 #if defined __linux__ || defined __native_client__ || defined __APPLE__ 19 19 # include <sys/time.h> 20 20 # include <unistd.h> … … 49 49 TimerData() 50 50 { 51 #if defined __linux__ || defined __ APPLE__51 #if defined __linux__ || defined __native_client__ || defined __APPLE__ 52 52 gettimeofday(&tv0, NULL); 53 53 #elif defined _WIN32 … … 64 64 { 65 65 float ret, towait; 66 #if defined __linux__ || defined __ APPLE__66 #if defined __linux__ || defined __native_client__ || defined __APPLE__ 67 67 struct timeval tv; 68 68 gettimeofday(&tv, NULL); … … 109 109 static float GetMsPerCycle() 110 110 { 111 #if defined __linux__ || defined __ APPLE__111 #if defined __linux__ || defined __native_client__ || defined __APPLE__ 112 112 return 1.0f; 113 113 #elif defined _WIN32 … … 122 122 } 123 123 124 #if defined __linux__ || defined __ APPLE__124 #if defined __linux__ || defined __native_client__ || defined __APPLE__ 125 125 struct timeval tv0; 126 126 #elif defined _WIN32 -
trunk/test/benchmark/trig.cpp
r964 r1082 74 74 timer.GetMs(); 75 75 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 76 #if defined HAVE_FASTMATH_H 76 #if defined HAVE_FASTMATH_H && !defined __native_client__ 77 77 pf2[i] = f_sinf(pf[i]); 78 78 #else … … 100 100 timer.GetMs(); 101 101 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 102 #if defined HAVE_FASTMATH_H 102 #if defined HAVE_FASTMATH_H && !defined __native_client__ 103 103 pf2[i] = f_cosf(pf[i]); 104 104 #else … … 131 131 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 132 132 { 133 #if defined HAVE_FASTMATH_H 133 #if defined HAVE_FASTMATH_H && !defined __native_client__ 134 134 pf2[i] = f_sinf(pf[i]); 135 135 pf3[i] = f_cosf(pf[i]); … … 160 160 timer.GetMs(); 161 161 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 162 #if defined HAVE_FASTMATH_H 162 #if defined HAVE_FASTMATH_H && !defined __native_client__ 163 163 pf2[i] = f_tanf(pf[i]); 164 164 #else -
trunk/test/tutorial/tut03.cpp
r1079 r1082 35 35 static GLenum const TEXTURE_FORMAT = GL_BGRA; 36 36 static GLenum const TEXTURE_TYPE = GL_UNSIGNED_INT_8_8_8_8_REV; 37 #elif defined __native_client__ 38 static GLint const INTERNAL_FORMAT = GL_RGBA; 39 static GLenum const TEXTURE_FORMAT = GL_RGBA; 40 static GLenum const TEXTURE_TYPE = GL_UNSIGNED_BYTE; 37 41 #else 38 42 /* Seems efficient for little endian textures */
Note: See TracChangeset
for help on using the changeset viewer.