void PostProcessing::Reconfigure(AmbientOcclusionConfig _aoConfig) { m_ambientOcclusionConfig = _aoConfig; // This will recreate all screen size dependent textures according to the current config. OnScreenResized(); // Similar goes for this one! ReLoadShader(); }
void Render::Load(wxFile& fs) { OpenItem(fs,b1); OpenItem(fs,b2); OpenItem(fs,LightDir); OpenItem(fs,step_length); // RenderingMethod* tmp; //ClearRMs(); int rm_num; OpenItem(fs,rm_num); for(int k=0;k<rm_num;k++) { wxString tmp_s; OpenString(fs,tmp_s); tmp=0; for(int i=0;i<rendering_methods.size();i++) if(rendering_methods[i]->fs_filename==tmp_s) { tmp = rendering_methods[i];break; } if(!tmp)continue; OpenString(fs,tmp->caption); OpenItem(fs,tmp->size); OpenItem(fs,tmp->pos); OpenItem(fs,tmp->isos_sum); OpenItem(fs,tmp->quads_sum); for(int i=0;i<MAX_VD_NUMBER;i++) { OpenItem(fs,tmp->min_level[i]); OpenItem(fs,tmp->max_level[i]); OpenItem(fs,tmp->opacity[i]); OpenVector(fs,tmp->tf_quads[i]); tmp->ApplyQuads(i); OpenVector(fs,tmp->tf_points[i]); OpenVector(fs,tmp->isos[i]); tmp->ApplyPoints(i); OpenItem(fs,tmp->iso_last[i]); OpenItem(fs,tmp->quad_last[i]); } //rendering_methods.push_back(tmp); OpenItem(fs,tmp->use_accel_struct); OpenItem(fs,tmp->use_cubic_filt);tmp->use_cubic_filt=0; OpenItem(fs,tmp->drop_shadows); OpenItem(fs,tmp->shade_mode); OpenItem(fs,tmp->tf_type); tmp=0; } OpenItem(fs,CurRM); SetCurRM(CurRM); ReLoadShader(); }