Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6333 in orxonox.OLD for branches/avi_play


Ignore:
Timestamp:
Dec 29, 2005, 6:12:24 PM (19 years ago)
Author:
hdavid
Message:

branches\avi_play: fixed a bug, still memory leak somewhere in MediaContainer

Location:
branches/avi_play/src
Files:
2 edited

Legend:

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

    r6325 r6333  
    190190                      GL_UNSIGNED_BYTE,
    191191                      surface->pixels);
    192         }
    193         else
    194           // update the texture
    195           glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, surface->w, surface->h, GL_RGB, GL_UNSIGNED_BYTE, surface->pixels);
    196         // build the MipMaps
    197         gluBuild2DMipmaps(GL_TEXTURE_2D,
     192          // build the MipMaps
     193          gluBuild2DMipmaps(GL_TEXTURE_2D,
    198194                          GL_RGB,
    199195                          surface->w,
     
    202198                          GL_UNSIGNED_BYTE,
    203199                          surface->pixels);
    204         glBindTexture(GL_TEXTURE_2D, 0);
     200          glBindTexture(GL_TEXTURE_2D, 0);
     201        }
     202        else
     203        {
     204          /* Create an OpenGL texture from the surface */
     205          glGenTextures(1, &texture);
     206          glBindTexture(GL_TEXTURE_2D, texture);
     207          glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
     208          glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
     209          // update the texture
     210          glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, surface->w, surface->h, GL_RGB, GL_UNSIGNED_BYTE, surface->pixels);
     211
     212          // build the MipMaps
     213          gluBuild2DMipmaps(GL_TEXTURE_2D,
     214                          GL_RGB,
     215                          surface->w,
     216                          surface->h,
     217                          GL_RGB,
     218                          GL_UNSIGNED_BYTE,
     219                          surface->pixels);
     220          glBindTexture(GL_TEXTURE_2D, 0);
     221        }
    205222
    206223        return texture;
  • branches/avi_play/src/subprojects/importer/multitex.cc

    r6330 r6333  
    6262
    6363  // get each fram individually
    64   while(seq->addFrame(movie->getNextFrame()) != NULL);
     64  //while(seq->addFrame(movie->getNextFrame()) != NULL);
    6565  // get a list of frames
    66   //movie->gotoFrame(start_frame);
    67   //seq->addFrameList(movie->getFrameList());
     66  movie->gotoFrame(start_frame);
     67  seq->addFrameList(movie->getFrameList());
    6868
    6969  testMat->setDiffuseMap("maps/radialTransparency.png");
Note: See TracChangeset for help on using the changeset viewer.