/** * Do not use this constructor. Used for destructible clones only. */ protected Shader(Shader s){ super(s.id); // Shader sources cannot be shared, therefore they must // be destroyed together with the parent shader. shaderSourceList = new ArrayList<ShaderSource>(); for (ShaderSource source : s.shaderSourceList){ shaderSourceList.add( (ShaderSource)source.createDestructableClone() ); } uniforms = null; bufferBlocks = null; boundUniforms = null; attribs = null; }
protected Shader(Shader s){ super(Shader.class, s.id); shaderList = new ArrayList<ShaderSource>(); //uniforms = new ListMap<String, Uniform>(); //attribs = new IntMap<Attribute>(); // NOTE: Because ShaderSources are registered separately with // the GLObjectManager for (ShaderSource source : s.shaderList){ shaderList.add( (ShaderSource)source.createDestructableClone() ); } }
/** * Do not use this constructor. Used for destructible clones only. */ protected Shader(Shader s){ super(s.id); // Shader sources cannot be shared, therefore they must // be destroyed together with the parent shader. shaderSourceList = new ArrayList<ShaderSource>(); for (ShaderSource source : s.shaderSourceList){ shaderSourceList.add( (ShaderSource)source.createDestructableClone() ); } uniforms = null; boundUniforms = null; attribs = null; }