Ignore:
Timestamp:
Sep 19, 2011, 1:32:18 AM (9 years ago)
Author:
sam
Message:

osx: link with the proper OpenGL libraries on OS X.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/video.cpp

    r939 r960  
    3434private:
    3535    static mat4 proj_matrix, view_matrix;
    36 #if defined __ANDROID__ || defined __CELLOS_LV2__
     36#if defined __ANDROID__ || defined __CELLOS_LV2__ || defined __APPLE__
    3737    static ivec2 saved_viewport;
    3838#endif
     
    4242mat4 VideoData::view_matrix;
    4343
    44 #if defined __ANDROID__ || defined __CELLOS_LV2__
     44#if defined __ANDROID__ || defined __CELLOS_LV2__ || defined __APPLE__
    4545ivec2 VideoData::saved_viewport = 0;
    4646#endif
     
    5252void Video::Setup(ivec2 size)
    5353{
    54 #if defined USE_GLEW
     54#if defined USE_GLEW && !defined __APPLE__
    5555    /* Initialise GLEW if necessary */
    5656    GLenum glerr = glewInit();
     
    6565    glViewport(0, 0, size.x, size.y);
    6666
    67 #if defined __ANDROID__ || defined __CELLOS_LV2__
     67#if defined __ANDROID__ || defined __CELLOS_LV2__ || defined __APPLE__
    6868    VideoData::saved_viewport = size;
    6969#endif
     
    7272    glClearDepth(1.0);
    7373
    74 #if defined HAVE_GL_2X
     74#if defined HAVE_GL_2X && !defined __APPLE__
    7575    glShadeModel(GL_SMOOTH);
    7676    glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
     
    184184    // FIXME: use psglCreateDeviceAuto && psglGetDeviceDimensions
    185185    return VideoData::saved_viewport;
     186#elif defined __APPLE__
     187    return VideoData::saved_viewport;
    186188#else
    187189    GLint v[4];
Note: See TracChangeset for help on using the changeset viewer.