Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 16, 2012, 3:32:20 PM (12 years ago)
Author:
davidsa
Message:

Orxonox::Model: added XMLPort 'material' to easily attach a material/shader to a Model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/shaders/src/orxonox/graphics/Model.cc

    r8858 r9402  
    7171
    7272        XMLPortParam(Model, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
     73        XMLPortParam(Model, "material", setMaterial, getMaterial, xmlelement, mode);
    7374        XMLPortParam(Model, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
    7475    }
     
    109110            }
    110111        }
     112    }
     113
     114    void Model::changedMaterial()
     115    {
     116        this->mesh_.setMaterial(this->materialName_);
    111117    }
    112118
Note: See TracChangeset for help on using the changeset viewer.