void SceneCache::initDefault() { Color errorColor = Color::Magenta; ColorTexturePtr errorCTexture(new ConstantTexture<Color>(errorColor)); addColorTexture(mErrorCode, errorCTexture); FloatTexturePtr errorFTexture(new ConstantTexture<float>(0.5f)); addFloatTexture(mErrorCode, errorFTexture); MaterialPtr errorMaterial(new LambertMaterial(errorCTexture)); addMaterial(mErrorCode, errorMaterial); Geometry* errorGeometry = new Sphere(1.0f); errorGeometry->init(); addGeometry(mErrorCode, errorGeometry); ParamSet modelParams; modelParams.setString("geometry", mErrorCode); modelParams.setString("material", mErrorCode); const Primitive* errorPrimitive = ModelPrimitiveCreator().create(modelParams, *this); addPrimitive(mErrorCode, errorPrimitive); addAreaLight(mErrorCode, NULL); }