Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3097 in orxonox.OLD


Ignore:
Timestamp:
Dec 5, 2004, 3:07:19 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/images: doxygen-tags, comments, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/images/importer/material.cc

    r3096 r3097  
    525525}
    526526
     527/**
     528   \brief reads in a jpg-file
     529   \param jpgName the Name of the Image to load
     530   \param texture a reference to the Texture to write the image to
     531*/
    527532bool Material::loadJPG (char* jpgName, GLuint* texture)
    528533{
     
    614619}
    615620
     621/**
     622   \brief reads in a tga-file
     623   \param tgaName the Name of the Image to load
     624   \param texture a reference to the Texture to write the image to
     625*/
    616626bool Material::loadTGA(const char * tgaName, GLuint* texture)
    617627{
    618628  typedef struct
    619629  {
    620     GLubyte Header[12];                                                                 /* TGA File Header */
     630    GLubyte Header[12];
    621631  } TGAHeader;
    622  TGAHeader tgaHeader;                   
    623 
    624   GLubyte uTGAcompare[12] = {0,0,2, 0,0,0,0,0,0,0,0,0}; /* Uncompressed TGA Header */
    625   GLubyte cTGAcompare[12] = {0,0,10,0,0,0,0,0,0,0,0,0}; /* Compressed TGA Header */
     632  TGAHeader tgaHeader;                 
     633 
     634  GLubyte uTGAcompare[12] = {0,0,2, 0,0,0,0,0,0,0,0,0}; // Uncompressed TGA Header
     635  GLubyte cTGAcompare[12] = {0,0,10,0,0,0,0,0,0,0,0,0}; // Compressed TGA Header
    626636  FILE * fTGA;
    627637  fTGA = fopen(tgaName, "rb");
     
    665675}
    666676
     677/**
     678   \brief reads in an uncompressed tga-file
     679   \param filename the Name of the Image to load
     680   \param fTGA a Pointer to a File, that should be read
     681   \param texture a reference to the Texture to write the image to
     682*/
    667683bool Material::loadUncompressedTGA(const char * filename, FILE * fTGA, GLuint* texture)
    668684{
     
    723739    }
    724740 
    725   /* Byte Swapping Optimized By Steve Thomas */
    726741  for(cswap = 0; cswap < (int)imageSize; cswap += bytesPerPixel)
    727742    {
     
    735750}
    736751
     752/**
     753   \brief reads in a compressed tga-file
     754   \param filename the Name of the Image to load
     755   \param fTGA a Pointer to a File, that should be read
     756   \param texture a reference to the Texture to write the image to
     757*/
    737758bool Material::loadCompressedTGA(const char * filename, FILE * fTGA, GLuint* texture)
    738759{
     
    873894          for(counter = 0; counter < chunkheader; counter++) //copy the color into the image data as many times as dictated
    874895            {                                                   
    875               // switch R and B bytes areound while copying                                                                                             /* by the header */
     896              // switch R and B bytes areound while copying
    876897              pImage->data[currentbyte    ] = colorbuffer[2];
    877898              pImage->data[currentbyte + 1] = colorbuffer[1];
     
    905926    }
    906927 
    907   while(currentpixel < pixelcount);     /* Loop while there are still pixels left */
     928  while(currentpixel < pixelcount);     // Loop while there are still pixels left
     929
    908930  loadTexToGL (pImage, texture);
    909931
Note: See TracChangeset for help on using the changeset viewer.