Changeset 1337


Ignore:
Timestamp:
May 4, 2012, 1:00:26 AM (9 years ago)
Author:
sam
Message:

gpu: activate backface culling on OpenGL to remain consistent with
the Direct3D backend.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gpu/vertexbuffer.cpp

    r1324 r1337  
    137137    }
    138138#else
     139    glFrontFace(GL_CCW);
     140    glEnable(GL_CULL_FACE);
    139141#   if defined HAVE_GL_2X && !defined __APPLE__
    140142    glEnable(GL_ALPHA_TEST);
  • trunk/src/gradient.cpp

    r1325 r1337  
    6464                             640.0f,   0.0f, 0.0f,
    6565                               0.0f, 480.0f, 0.0f,
     66                             640.0f, 480.0f, 0.0f,
    6667                               0.0f, 480.0f, 0.0f,
    67                              640.0f, 480.0f, 0.0f,
    6868                             640.0f,   0.0f, 0.0f, };
    6969
  • trunk/src/tileset.cpp

    r1310 r1337  
    279279        float tmp[10];
    280280
     281        *vertex++ = pos.x + dx;
     282        *vertex++ = pos.y + dy;
     283        *vertex++ = pos.z + dz;
     284        *texture++ = tx + data->tx;
     285        *texture++ = ty;
     286
    281287        *vertex++ = tmp[0] = pos.x;
    282288        *vertex++ = tmp[1] = pos.y + dy;
     
    285291        *texture++ = tmp[4] = ty;
    286292
    287         *vertex++ = pos.x + dx;
    288         *vertex++ = pos.y + dy;
    289         *vertex++ = pos.z + dz;
    290         *texture++ = tx + data->tx;
    291         *texture++ = ty;
    292 
    293293        *vertex++ = tmp[5] = pos.x + dx;
    294294        *vertex++ = tmp[6] = pos.y;
     
    297297        *texture++ = tmp[9] = ty + data->ty;
    298298
     299        *vertex++ = tmp[5];
     300        *vertex++ = tmp[6];
     301        *vertex++ = tmp[7];
     302        *texture++ = tmp[8];
     303        *texture++ = tmp[9];
     304
    299305        *vertex++ = tmp[0];
    300306        *vertex++ = tmp[1];
     
    303309        *texture++ = tmp[4];
    304310
    305         *vertex++ = tmp[5];
    306         *vertex++ = tmp[6];
    307         *vertex++ = tmp[7];
    308         *texture++ = tmp[8];
    309         *texture++ = tmp[9];
    310 
    311311        *vertex++ = pos.x;
    312312        *vertex++ = pos.y;
Note: See TracChangeset for help on using the changeset viewer.