Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 28, 2006, 10:17:56 AM (18 years ago)
Author:
bensch
Message:

more nice comments, and also updated the KeepLevel loading (if you want to load a Resource to a KeepLevel just append it at loadtime:
eg.:
Texture tex = ResourceTexture(orxonox.png, GL_TEXTURE_2D, GameEnd);
where GameEnd is the KeepLevel as defined in orxonox.cc→initResources()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/graphics/resource_shader.cc

    r9847 r9854  
    44#include "substring.h"
    55
    6 ResourceShader::ResourceShader(const std::string& vertexShaderName, const std::string& fragmentShaderName)
     6ResourceShader::ResourceShader(const std::string& vertexShaderName, const std::string& fragmentShaderName, const Resources::KeepLevel& keepLevel)
    77    : Resource(&ResourceShader::type)
    88{
     
    2323
    2424    this->Shader::load(vertexFileName, fragmentFileName);
    25     this->Resource::addResource(new ResourceShader::ShaderResourcePointer(vertexShaderName+','+fragmentShaderName, Resources::KeepLevel(0), this->Shader::dataPointer()));
     25    this->Resource::addResource(new ResourceShader::ShaderResourcePointer(vertexShaderName+','+fragmentShaderName, keepLevel, this->Shader::dataPointer()));
    2626  }
    2727}
    2828
    29 ResourceShader ResourceShader::createFromString(const std::string& loadString)
     29ResourceShader ResourceShader::createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel)
    3030{
    3131  std::string vertexShaderName;
     
    3838    fragmentShaderName = shaderNames[1];
    3939
    40   return ResourceShader(vertexShaderName, fragmentShaderName);
     40  return ResourceShader(vertexShaderName, fragmentShaderName, keepLevel);
    4141}
    4242
Note: See TracChangeset for help on using the changeset viewer.