Changeset 960
- Timestamp:
- Sep 19, 2011, 1:32:18 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r958 r960 103 103 [MAKE_FSELF=no]) 104 104 AM_CONDITIONAL(USE_MAKE_FSELF, test "${MAKE_FSELF}" != "no") 105 106 107 LIBS_save="$LIBS" 108 LIBS="$LIBS -Wl,-framework -Wl,OpenGL" 109 AC_MSG_CHECKING(for -framework OpenGL) 110 AC_TRY_LINK([], [], 111 [ac_cv_my_have_cocoa="yes" 112 AC_MSG_RESULT(yes) 113 GL_LIBS="${GL_LIBS} -framework OpenGL" 114 CXXFLAGS="${CXXFLAGS} -ObjC++"], 115 [AC_MSG_RESULT(no)]) 116 LIBS="$LIBS_save" 105 117 106 118 … … 233 245 234 246 235 dnl Use Cocoa?236 ac_cv_my_have_cocoa="no"237 LIBS_save="$LIBS"238 LIBS="$LIBS -Wl,-framework -Wl,Cocoa"239 AC_MSG_CHECKING(for -framework Cocoa)240 AC_TRY_LINK([], [],241 [ac_cv_my_have_cocoa="yes"242 AC_MSG_RESULT(yes)243 CXXFLAGS="${CXXFLAGS} -ObjC++"],244 [AC_MSG_RESULT(no)])245 LIBS="$LIBS_save"246 AM_CONDITIONAL(USE_COCOA, test "${ac_cv_my_have_cocoa}" != "no")247 248 249 247 dnl Use EGL? 250 248 ac_cv_my_have_egl="no" -
trunk/src/debug/quad.cpp
r943 r960 154 154 if (!data->initialised && !IsDestroying()) 155 155 { 156 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ 156 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ 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__ 186 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ 187 187 glDeleteVertexArrays(NUM_ARRAYS, data->array); 188 188 #endif … … 916 916 * animated distorted checkerboard. 917 917 */ 918 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ 918 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ 919 919 if (!shader[0]) 920 920 { … … 986 986 * animated distorted checkerboard. 987 987 */ 988 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ 988 #if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ 989 989 if (!shader[0]) 990 990 { -
trunk/src/gradient.cpp
r861 r960 34 34 Shader *shader; 35 35 GLuint bufs[2]; 36 #if defined HAVE_GL_2X 36 #if defined HAVE_GL_2X && !defined __APPLE__ 37 37 GLuint vaos[1]; 38 38 #endif … … 155 155 #if !defined __CELLOS_LV2__ 156 156 glGenBuffers(2, data->bufs); 157 # if defined HAVE_GL_2X 157 # if defined HAVE_GL_2X && !defined __APPLE__ 158 158 glGenVertexArrays(1, data->vaos); 159 159 # endif … … 196 196 /* Bind vertex, color and texture coordinate buffers */ 197 197 #if !defined __CELLOS_LV2__ 198 # if defined HAVE_GL_2X 198 # if defined HAVE_GL_2X && !defined __APPLE__ 199 199 glBindVertexArray(data->vaos[0]); 200 200 # endif … … 223 223 224 224 #if !defined __CELLOS_LV2__ 225 # if defined HAVE_GL_2X 225 # if defined HAVE_GL_2X && !defined __APPLE__ 226 226 glBindVertexArray(0); 227 227 # endif -
trunk/src/lolgl.h
r954 r960 24 24 #endif 25 25 26 /* Include GL */ 27 #if defined USE_GLEW 26 /* Include GL development headers. 27 * Do not include glew.h on OS X, because the version shipped with Fink 28 * links with X11 whereas we want the system’s Cocoa-friendly GL libs. */ 29 #if defined USE_GLEW && !defined __APPLE__ 28 30 # include <glew.h> 29 31 #elif defined HAVE_GL_2X 30 # if defined __APPLE__ && defined __MACH__ 32 # if defined __APPLE__ && defined __MACH__ && defined __arm__ 31 33 # include <OpenGL/gl.h> 34 # elif defined __APPLE__ && defined __MACH__ 35 # define MACOS_OPENGL 36 # define GL_GLEXT_PROTOTYPES 37 # include <OpenGL/OpenGL.h> 38 # include <OpenGL/gl.h> 39 # include <OpenGL/glext.h> 32 40 # else 33 41 # define GL_GLEXT_PROTOTYPES -
trunk/src/scene.cpp
r866 r960 60 60 float angle; 61 61 62 #if defined HAVE_GL_2X 62 #if defined HAVE_GL_2X && !defined __APPLE__ 63 63 GLuint vao; 64 64 #endif … … 85 85 data->nbufs = 0; 86 86 87 #if defined HAVE_GL_2X 87 #if defined HAVE_GL_2X && !defined __APPLE__ 88 88 glGenVertexArrays(1, &data->vao); 89 89 #endif … … 97 97 if (data->nbufs > 0) 98 98 glDeleteBuffers(data->nbufs, data->bufs); 99 #if defined HAVE_GL_2X 99 #if defined HAVE_GL_2X && !defined __APPLE__ 100 100 glDeleteVertexArrays(1, &data->vao); 101 101 #endif … … 321 321 glEnable(GL_DEPTH_TEST); 322 322 glDepthFunc(GL_LEQUAL); 323 #if defined HAVE_GL_2X 323 #if defined HAVE_GL_2X && !defined __APPLE__ 324 324 glEnable(GL_ALPHA_TEST); 325 325 glAlphaFunc(GL_GEQUAL, 0.01f); … … 360 360 361 361 /* Bind vertex, color and texture coordinate buffers */ 362 #if defined HAVE_GL_2X 362 #if defined HAVE_GL_2X && !defined __APPLE__ 363 363 glBindVertexArray(data->vao); 364 364 #endif … … 387 387 glDrawArrays(GL_TRIANGLES, 0, (n - i) * 6); 388 388 389 #if defined HAVE_GL_2X 389 #if defined HAVE_GL_2X && !defined __APPLE__ 390 390 glBindVertexArray(0); 391 391 #endif -
trunk/src/video.cpp
r939 r960 34 34 private: 35 35 static mat4 proj_matrix, view_matrix; 36 #if defined __ANDROID__ || defined __CELLOS_LV2__ 36 #if defined __ANDROID__ || defined __CELLOS_LV2__ || defined __APPLE__ 37 37 static ivec2 saved_viewport; 38 38 #endif … … 42 42 mat4 VideoData::view_matrix; 43 43 44 #if defined __ANDROID__ || defined __CELLOS_LV2__ 44 #if defined __ANDROID__ || defined __CELLOS_LV2__ || defined __APPLE__ 45 45 ivec2 VideoData::saved_viewport = 0; 46 46 #endif … … 52 52 void Video::Setup(ivec2 size) 53 53 { 54 #if defined USE_GLEW 54 #if defined USE_GLEW && !defined __APPLE__ 55 55 /* Initialise GLEW if necessary */ 56 56 GLenum glerr = glewInit(); … … 65 65 glViewport(0, 0, size.x, size.y); 66 66 67 #if defined __ANDROID__ || defined __CELLOS_LV2__ 67 #if defined __ANDROID__ || defined __CELLOS_LV2__ || defined __APPLE__ 68 68 VideoData::saved_viewport = size; 69 69 #endif … … 72 72 glClearDepth(1.0); 73 73 74 #if defined HAVE_GL_2X 74 #if defined HAVE_GL_2X && !defined __APPLE__ 75 75 glShadeModel(GL_SMOOTH); 76 76 glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); … … 184 184 // FIXME: use psglCreateDeviceAuto && psglGetDeviceDimensions 185 185 return VideoData::saved_viewport; 186 #elif defined __APPLE__ 187 return VideoData::saved_viewport; 186 188 #else 187 189 GLint v[4];
Note: See TracChangeset
for help on using the changeset viewer.