Changeset 1083


Ignore:
Timestamp:
Nov 21, 2011, 1:49:50 AM (12 years ago)
Author:
sam
Message:

gl: do not enable or disable GL_TEXTURE_2D with GLES 2.0, it's now illegal.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/debug/quad.cpp

    r1082 r1083  
    163163
    164164        /* Checkerboard texture */
     165#if !defined HAVE_GLES_2X
    165166        glEnable(GL_TEXTURE_2D);
     167#endif
    166168        glBindTexture(GL_TEXTURE_2D, data->texture[0]);
    167169        for (int j = 0; j < TEX_SIZE; j++)
     
    304306     */
    305307#if defined HAVE_GLBEGIN || defined USE_GLEW
     308#if !defined HAVE_GLES_2X
    306309    glEnable(GL_TEXTURE_2D);
     310#endif
    307311    glBindTexture(GL_TEXTURE_2D, data->texture[0]);
    308312    glColor3f(1.0f, 1.0f, 1.0f);
     
    328332        glVertex3f(data->aa.x, data->bb.y, 0.0f);
    329333    glEnd();
     334#if !defined HAVE_GLES_2X
    330335    glDisable(GL_TEXTURE_2D);
     336#endif
    331337#endif
    332338
     
    10781084#endif
    10791085
     1086#if !defined HAVE_GLES_2X
    10801087    glEnable(GL_TEXTURE_2D);
     1088#endif
    10811089    glBindTexture(GL_TEXTURE_2D, 0);
    10821090#if defined HAVE_GLBEGIN || defined USE_GLEW || defined __CELLOS_LV2__
     
    10861094    glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_FALSE);
    10871095#endif
     1096#if !defined HAVE_GLES_2X
    10881097    glDisable(GL_TEXTURE_2D);
     1098#endif
    10891099
    10901100    glDisable(GL_BLEND);
  • trunk/src/scene.cpp

    r1044 r1083  
    138138#if !defined __CELLOS_LV2__
    139139        stdshader = Shader::Create(
     140#if !defined HAVE_GLES_2X
    140141            "#version 130\n"
     142#endif
    141143            "\n"
    142144#if defined HAVE_GLES_2X
     
    163165            "}\n",
    164166
     167#if !defined HAVE_GLES_2X
    165168            "#version 130\n"
     169#else
     170            "precision mediump float;\n"
     171#endif
    166172            "\n"
    167173            "uniform sampler2D in_Texture;\n"
     
    318324#endif
    319325
     326#if !defined HAVE_GLES_2X
    320327    glEnable(GL_TEXTURE_2D);
     328#endif
    321329    glEnable(GL_DEPTH_TEST);
    322330    glDepthFunc(GL_LEQUAL);
     
    406414    data->ntiles = 0;
    407415
     416#if !defined HAVE_GLES_2X
    408417    glDisable(GL_TEXTURE_2D);
     418#endif
    409419    glDisable(GL_DEPTH_TEST);
    410420#if defined HAVE_GL_2X && !defined __APPLE__
Note: See TracChangeset for help on using the changeset viewer.