Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8642 in orxonox.OLD


Ignore:
Timestamp:
Jun 20, 2006, 5:47:04 PM (18 years ago)
Author:
ponder
Message:

Removed two bugs

  1. The indices weren't copied properly to the shared buffer.
  2. GL_CULL_FACE enabled is only appropriate when you're flying above the ground. i're underneath, you'll see nothing.
Location:
branches/terrain/src/lib/graphics/importer/terrain
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/terrain/src/lib/graphics/importer/terrain/terrain.cc

    r8641 r8642  
    129129                bi.numIndices+=2;
    130130        }
    131         for ( unsigned short *i = _indices; i < end; ++i ) {
    132                 *indices = *i+offset;
     131        for ( unsigned short *i = _indices; i < end; ++i, ++dst ) {
     132                *dst = *i+offset;
    133133        }
    134134        bi.numIndices+=_numIndices;
     
    184184                glEnableClientState( GL_TEXTURE_COORD_ARRAY );
    185185                glDisableClientState( GL_NORMAL_ARRAY );
    186                
     186        glDisable( GL_CULL_FACE );
    187187        glDisable( GL_LIGHTING );
    188188        glColor3f( 1.0f, 1.0f, 1.0f );
  • branches/terrain/src/lib/graphics/importer/terrain/terrain.h

    r8641 r8642  
    7171                const static int PAGE_SIZE                      = 17;
    7272                const static int MAX_VERTICES           = PAGE_SIZE*PAGE_SIZE;
    73                 const static int MAX_INDICES            = 3*MAX_VERTICES/*2*( PAGE_SIZE*PAGE_SIZE - PAGE_SIZE ) - 2*/;
     73                const static int MAX_INDICES            = 2*( PAGE_SIZE*PAGE_SIZE + PAGE_SIZE -2 );
    7474                /**
    7575                 * The amount of geometry rendered is largely depending on this constant. So chose a
Note: See TracChangeset for help on using the changeset viewer.