[SOLVED]Won't render quad no matter what I do in OpenGL3+,what am I doing wrong?

Problem is happening again.

been following new set of tutorials I discovered by ThinMatrix on Youtube https://www.youtube.com/playlist?list=PLRIWtICgwaX0u7Rf9zkZhLoLuZVfUksDP and all indications are it will be a good set. However I am having a problem that keeps recurring. No errors, no squiggly lines, nothing. It just doesn’t display anything.

The focus of the tutorials is to use OpenGL3+ VAOs and VBOs and don’t use the fixed pipeline of older OpenGL versions. Exactly what I am trying to do, but I can’t make it work. I just get a blank red window. It works just fine if I remove Indexing, but fails when I use it again.


        ContextAttribs attribs = new ContextAttribs(3,2);
        attribs.withForwardCompatible(true);
        attribs.withProfileCore(true);
        
        try {
            Display.setDisplayMode(new DisplayMode(WIDTH, HEIGHT));
            Display.create(new PixelFormat(), attribs);
            Display.setTitle("ThinMatrix Tutorials");
        } catch (LWJGLException ex){
            ex.printStackTrace();
        }
        
        glViewport(0,0, WIDTH, HEIGHT);
        glClearColor(1,0,0,1);
        
        // method of my own making that has been verified
        int shaderProgram = initializeShaders();        
        
        float[] vertices = {        // floats for Indexed Quad
            -0.5f, +0.5f, 0f, // 0
            -0.5f, -0.5f, 0f, // 1
            +0.5f, -0.5f, 0f, // 2
            +0.5f, +0.5f, 0f};// 3
        
//        float[] vertices = {      // floats for Non-Indexed Quad
//            -0.5f, +0.5f, 0f, // 0
//            -0.5f, -0.5f, 0f, // 1
//            +0.5f, +0.5f, 0f, // 3
//            +0.5f, +0.5f, 0f, // 3
//            -0.5f, -0.5f, 0f, // 1
//            +0.5f, -0.5f, 0f};// 2
        
        int[] indices = {
                    0,1,3,
                    3,1,2};
                    
        int vertexCount = indices.length;
        
        int vaoID = glGenVertexArrays();
        glBindVertexArray(vaoID);
        
        int vboID = glGenBuffers();
        glBindBuffer(GL_ARRAY_BUFFER, vboID);
        FloatBuffer vBuffer = BufferUtils.createFloatBuffer(vertices.length);
        vBuffer.put(vertices);
        vBuffer.flip();
        glBufferData(GL_ARRAY_BUFFER, vBuffer, GL_STATIC_DRAW);
        glVertexAttribPointer(attributeNumber, 3, GL_FLOAT, false, 0, 0);
        glBindBuffer(GL_ARRAY_BUFFER, 0); // Unbind
        
        int iboID = glGenBuffers();
        glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, iboID);
        IntBuffer iBuffer = BufferUtils.createIntBuffer(indices.length);
        iBuffer.put(indices);
        iBuffer.flip();
        glBufferData(GL_ELEMENT_ARRAY_BUFFER, iBuffer, GL_STATIC_DRAW);
        //glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); // Unbind
        
        glBindVertexArray(0);

        while(!Display.isCloseRequested()){
            // Clear Screen        
            glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

            glUseProgram(shaderProgram);
            
            glBindVertexArray(vaoID);
            glEnableVertexAttribArray(0);
            
            glDrawElements(GL_TRIANGLES, vertexCount, GL_UNSIGNED_INT, 0);
            //glDrawArrays(GL_TRIANGLES, 0, vertexCount);
            
            glDisableVertexAttribArray(0);
            glBindVertexArray(0);
            
            glUseProgram(0);
            
            Display.update();
            Display.sync(FPS_CAP);
        }
        
        Display.destroy();
        System.exit(0);

Vertex Shader:


#version 400 core

in vec3 position;

out vec3 color;

void main() {

    gl_Position = vec4(position, 1.0);
    color = vec3(position.x+0.5, 1.0, position.z+0.5);
}

Fragment Shader:


#version 400 core

in vec3 color;

out vec4 final_color;

void main() {
    final_color = vec4(color, 1.0);
}