Ignore:
Timestamp:
Feb 14, 2011, 2:26:31 AM (10 years ago)
Author:
sam
Message:

Switch scene rendering method to vertex buffer objects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tiler.cpp

    r637 r645  
    9494}
    9595
    96 void Tiler::BlitTile(uint32_t code, int x, int y, int z, int o)
     96void Tiler::Bind(uint32_t code)
     97{
     98    int id = (code >> 16) - 1; /* ID 0 is for the empty tileset */
     99
     100    TileSet *tileset = (TileSet *)data->tilesets.GetEntity(id);
     101#if !FINAL_RELEASE
     102    if (!tileset)
     103    {
     104        if (id != data->lasterror)
     105            fprintf(stderr, "ERROR: binding null tiler #%i\n", id);
     106        data->lasterror = id;
     107        return;
     108    }
     109#endif
     110    tileset->Bind();
     111}
     112
     113void Tiler::BlitTile(uint32_t code, int x, int y, int z, int o,
     114                     float *vertex, float *texture)
    97115{
    98116    int id = (code >> 16) - 1; /* ID 0 is for the empty tileset */
     
    108126    }
    109127#endif
    110     tileset->BlitTile(code & 0xffff, x, y, z, o);
     128    tileset->BlitTile(code & 0xffff, x, y, z, o, vertex, texture);
    111129}
    112130
Note: See TracChangeset for help on using the changeset viewer.