Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 7, 2005, 5:22:44 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the Trunk/importer back here.
merged with command:
svn merge -r 3918:HEAD ../../trunk/src/lib/graphics/importer/ src/lib/graphics/importer/

this fixed the issue with the segfault. It really was an error in the Model-class
@nico:

  1. sorry
  2. thanks for pointing this out to me
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/heightMap/src/lib/graphics/importer/texture.cc

    r3905 r4111  
    2525Texture::Texture(const char* imageName)
    2626{
     27  bAlpha = false;
    2728  this->texture = 0;
    2829  if (imageName)
     
    112113      if ( (saved_flags & SDL_SRCALPHA) == SDL_SRCALPHA ) {
    113114        SDL_SetAlpha(surface, saved_flags | SDL_OPENGL, saved_alpha);
     115        this->bAlpha = true;
    114116      }
    115117     
     
    119121      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
    120122      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
    121       /*      glTexImage2D(GL_TEXTURE_2D,
     123      // build the Texture
     124      glTexImage2D(GL_TEXTURE_2D,
    122125                   0,
    123126                   GL_RGBA,
     
    127130                   GL_UNSIGNED_BYTE,
    128131                   image->pixels);
    129       */
     132      // build the MipMaps
    130133      gluBuild2DMipmaps(GL_TEXTURE_2D,
    131                         3,
     134                        GL_RGBA,
    132135                        w,
    133136                        h,
     
    135138                        GL_UNSIGNED_BYTE,
    136139                        image->pixels);
    137 
     140     
    138141      SDL_FreeSurface(image); /* No longer needed */
    139142     
Note: See TracChangeset for help on using the changeset viewer.