title: Delete an existing shader or program (or get its Id to do so)
body: <p>I have a compiled shader or program (not sure of the correct term) and I need to delete it.</p>
  
  <p>How do I find the Id of compiled programs and/or shaders to do so?</p>
  
  <p>I know it exists because the debugger tells me that I am trying to redefine it, and cannot compile it again because of this:</p>
  
  <pre><code>ERROR: 0:1: error(#198) Redefinition at_coord_Y
  ERROR: 1:1: error(#248) Function already has a body main
  </code></pre>
  
  <p>The first line of the shaders source is:</p>
  
  <pre><code>"in float at_coord_Y;"
  </code></pre>
  
  <p>Can I somehow use this to find the Id?</p>
  
  <p>EDIT 1: Hopefully to clarify a bit, the shader fails to compile because it already exists.</p>
  
  <pre><code>    GLint compiled = UNDEFINED_VALUE;
  
      const GLchar* shaderSrc[] = {
          "in float at_coord_Y;",
          "void main()",
          "{",
                // Dont mind the empty space
          "}"
      };
  
      GLuint shaderId = glCreateShader(GL_VERTEX_SHADER);
  
      glShaderSource(shaderId, glNumberOfLines(shaderSrc), shaderSrc, NULL);
  
      glCompileShader(shaderId);  // Fail to compile because it already exists. Redefinition error.
  
      glGetShaderiv(shaderId), GL_COMPILE_STATUS, &amp;compiled); // Compile status GL_FALSE
  </code></pre>
  
  <p>But how can I find the Id of an existing shader (or program)?</p>