Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 16, 2006, 11:35:49 PM (19 years ago)
Author:
ponder
Message:
  • Added multitexturing support to the terrain-class.
  • The lightmap gets screwed up and I don't know why…
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/terrain/src/world_entities/terrain_entity.cc

    r8328 r8548  
    140140void TerrainEntity::loadLightmap( const std::string& _lightFile )
    141141{
    142         terrain->setLightmap( _lightFile );
     142        Material *mat = new Material( "TERR_LM" );
     143        mat->setDiffuse( 1.0f, 1.0f, 1.0f );
     144        mat->setAmbient( 1.0f, 1.0f, 1.0f );
     145        mat->setDiffuseMap( _lightFile, GL_TEXTURE_2D, 0 );     
     146        mat->setDiffuseMap( std::string( "pictures/lehm.png" ), GL_TEXTURE_2D, 1 );     
     147        terrain->addMaterial( mat );
    143148}
    144149
Note: See TracChangeset for help on using the changeset viewer.