protected void resetUniformLocations(Shader shader) { ListMap<String, Uniform> uniforms = shader.getUniformMap(); for (int i = 0; i < uniforms.size(); i++) { Uniform uniform = uniforms.getValue(i); uniform.reset(); // e.g check location again } }
/** * Usually called when the shader itself changes or during any * time when the variable locations need to be refreshed. */ public void resetLocations() { if (uniforms != null) { // NOTE: Shader sources will be reset separately from the shader itself. for (Uniform uniform : uniforms.values()) { uniform.reset(); // fixes issue with re-initialization } } if (bufferBlocks != null) { for (ShaderBufferBlock shaderBufferBlock : bufferBlocks.values()) { shaderBufferBlock.reset(); } } if (attribs != null) { for (Entry<Attribute> entry : attribs) { entry.getValue().location = ShaderVariable.LOC_UNKNOWN; } } }
/** * Usually called when the shader itself changes or during any * time when the var locations need to be refreshed. */ public void resetLocations(){ // NOTE: Shader sources will be reset seperately from the shader itself. for (Uniform uniform : uniforms.values()){ uniform.reset(); // fixes issue with re-initialization } for (Entry<Attribute> entry : attribs){ entry.getValue().location = -2; } }
/** * Usually called when the shader itself changes or during any * time when the variable locations need to be refreshed. */ public void resetLocations() { if (uniforms != null) { // NOTE: Shader sources will be reset separately from the shader itself. for (Uniform uniform : uniforms.values()) { uniform.reset(); // fixes issue with re-initialization } } if (attribs != null) { for (Entry<Attribute> entry : attribs) { entry.getValue().location = ShaderVariable.LOC_UNKNOWN; } } }
protected void resetUniformLocations(Shader shader) { ListMap<String, Uniform> uniforms = shader.getUniformMap(); for (int i = 0; i < uniforms.size(); i++) { Uniform uniform = uniforms.getValue(i); uniform.reset(); // e.g check location again } }
protected void resetUniformLocations(Shader shader) { ListMap<String, Uniform> uniforms = shader.getUniformMap(); for (int i = 0; i < uniforms.size(); i++) { Uniform uniform = uniforms.getValue(i); uniform.reset(); // e.g check location again } }