Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7164 in orxonox.OLD for trunk/src/lib/graphics


Ignore:
Timestamp:
Feb 18, 2006, 5:32:35 PM (19 years ago)
Author:
bensch
Message:

deleted unused stuff

Location:
trunk/src/lib/graphics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/shader.cc

    r6645 r7164  
    2222#include <stdio.h>
    2323#include "debug.h"
    24 #include "array.h"
    2524
    2625#include "resource_manager.h"
     
    126125
    127126
    128   tArray<char*>* program = fileReadArray(fileName);
    129   if (program == NULL)
    130     return false;
     127  std::vector<char*>* program = fileReadArray(fileName);
    131128
    132129  if (type == SHADER_VERTEX && GLEW_ARB_vertex_shader)
     
    149146  {
    150147    GLint status = 0;
    151     glShaderSourceARB(shader, program->getCount(), (const char**)program->getArray(), NULL);
     148    glShaderSourceARB(shader, program->size(), (const char**)&(*program)[0], NULL);
    152149    glCompileShaderARB(shader);
    153150    // checking on error.
     
    158155      glAttachObjectARB(this->shaderProgram, shader);
    159156  }
    160   for (unsigned int i=0; i< program->getCount(); i++)
    161     delete[] program->getArray()[i];
     157  for (unsigned int i=0; i< program->size(); i++)
     158    delete[] (*program)[i];
    162159  delete program;
    163160}
     
    190187
    191188
    192 tArray<char*>* Shader::fileReadArray(const char* fileName)
     189std::vector<char*>* Shader::fileReadArray(const char* fileName)
    193190{
    194191  FILE*    stream;           //< The stream we use to read the file.
     
    199196    return NULL;
    200197  }
    201   tArray<char*>* file = new tArray<char*>;
     198  std::vector<char*>* file = new std::vector<char*>;
    202199
    203200  char lineBuffer[PARSELINELENGHT];
     
    207204    addString = new char[strlen(lineBuffer)+1];
    208205    strcpy(addString, lineBuffer);
    209     file->addEntry(addString);
     206    file->push_back(addString);
    210207  }
    211208  fclose(stream);
    212   file->finalizeArray();
    213209  return file;
    214210}
  • trunk/src/lib/graphics/shader.h

    r5390 r7164  
    99#include "base_object.h"
    1010#include "glincl.h"
     11#include <vector>
    1112
    12 template<class T> class tArray;
    1313
    1414typedef enum
     
    3838
    3939  char* fileRead(const char* fileName);
    40   tArray<char*>* fileReadArray(const char* fileName);
     40  std::vector<char*>* fileReadArray(const char* fileName);
    4141
    4242  static bool checkShaderAbility();
Note: See TracChangeset for help on using the changeset viewer.