Changeset 704


Ignore:
Timestamp:
Feb 28, 2011, 3:26:27 AM (11 years ago)
Author:
sam
Message:

Use glClientActiveTexture() wherever it appears to make sense.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/debugquad.cpp

    r703 r704  
    5252{
    5353    data->initialised = 0;
    54     data->time = 0.0f;
     54    data->time = RandF(10000.0f);
    5555
    5656    drawgroup = DRAWGROUP_HUD;
     
    115115        glGenTextures(1, data->texlist);
    116116
    117         glActiveTexture(GL_TEXTURE0);
     117        glEnable(GL_TEXTURE_2D);
    118118        glBindTexture(GL_TEXTURE_2D, data->texlist[0]);
    119119        for (int j = 0; j < 32; j++)
     
    179179
    180180    /* Bind texture */
    181     glActiveTexture(GL_TEXTURE0);
     181    glClientActiveTexture(GL_TEXTURE0);
    182182    glBindTexture(GL_TEXTURE_2D, data->texlist[0]);
    183183
     
    218218
    219219    /* Bind texture */
    220     glActiveTexture(GL_TEXTURE0);
     220    glClientActiveTexture(GL_TEXTURE0);
    221221    glBindTexture(GL_TEXTURE_2D, data->texlist[0]);
    222222
  • trunk/src/tileset.cpp

    r689 r704  
    137137
    138138        glGenTextures(1, &data->texture);
     139        glEnable(GL_TEXTURE_2D);
    139140        glBindTexture(GL_TEXTURE_2D, data->texture);
    140141
    141         glTexImage2D(GL_TEXTURE_2D, 0, planes, w, h, 0,
     142        glTexImage2D(GL_TEXTURE_2D, 0, format, w, h, 0,
    142143                     format, GL_UNSIGNED_BYTE, pixels);
    143144
     
    170171{
    171172    if (!data->img && data->texture)
     173    {
     174        glClientActiveTexture(GL_TEXTURE0);
    172175        glBindTexture(GL_TEXTURE_2D, data->texture);
     176    }
    173177}
    174178
Note: See TracChangeset for help on using the changeset viewer.