Config configures the entire system, after everything has been setup (Pipelines, Vars, etc). Memory / Values do not yet need to be initialized but are allocated from the Vars on this call, so the total number of Values per Var, and number of VarSets, all must be configured.
()
| 267 | // so the total number of Values per Var, and number of VarSets, |
| 268 | // all must be configured. |
| 269 | func (sy *System) Config() { |
| 270 | sy.Mem.Vars.StaticVars = sy.StaticVars |
| 271 | sy.Mem.Config(sy.Device.Device) |
| 272 | if sy.StaticVars { |
| 273 | sy.Mem.Vars.BindStatVarsAll() |
| 274 | } else { |
| 275 | sy.Mem.Vars.BindDynVarsAll() |
| 276 | } |
| 277 | ntextures := sy.Mem.Vars.NTextures |
| 278 | rebuild := ntextures != sy.configNTextures |
| 279 | if Debug { |
| 280 | fmt.Printf("%s\n", sy.Vars().StringDoc()) |
| 281 | } |
| 282 | for _, pl := range sy.Pipelines { |
| 283 | pl.Config(rebuild) |
| 284 | } |
| 285 | sy.configNTextures = ntextures |
| 286 | } |
| 287 | |
| 288 | ////////////////////////////////////////////////////////////// |
| 289 | // Set graphics options |
no test coverage detected