Q:

glBindAttribLocation whats next?

I'm struggling to find OpenGL/GLSL examples that don't require glew or glut or what have you.
I'm trying to work with only using glfw3 (if possible I would like to use no other libraries) and I'm struggling to understand what to do once I use glBindAttribLocation? I've written code to pass an image as a texture into shaders, but I can't figure how to pass vertices.
I have a vertex shader and fragment shader I want to make a triangle and then color it red, I can create the shader programs and object program and link everything, but how do I pass things to the shaders.
// vert
in vec3 vPosition;

void main()
{
    gl_Position = vec4(vPosition,1.0);
}

// Frag
out vec4 color;
void main()
{
    color = vec4(1.0,0.0,0.0,1.0);
}

I don't understand what I need to do after I call glBindAttribLocation
glBindAttribLocation(p,0,"vPosition");
glUseProgram(p);

now how do I pass the vertices of a triangle into the shader?
more code, I'm calling my own library to read in the files so the textread won't work if anyone tries to run it
#include <GLFW/glfw3.h>

#include <stdlib.h>
#include <stdio.h>

#include "src/textfile.h"

GLuint v,f,p;

void printLog(GLuint obj)
{
    int infologLength = 0;
    int maxLength;

    if(glIsShader(obj))
        glGetShaderiv(obj,GL_INFO_LOG_LENGTH,&maxLength);
    else
        glGetProgramiv(obj,GL_INFO_LOG_LENGTH,&maxLength);

    char infoLog[maxLength];

    if (glIsShader(obj))
        glGetShaderInfoLog(obj, maxLength, &infologLength, infoLog);
    else
        glGetProgramInfoLog(obj, maxLength, &infologLength, infoLog);

    if (infologLength > 0)
        printf("%s\n",infoLog);
}

static void error_callback(int error, const char* description)
{
    fputs(description, stderr);
}

static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)
{
    if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
        glfwSetWindowShouldClose(window, GL_TRUE);
}

void setShaders() {

    char *vs = NULL,*fs = NULL;

    v = glCreateShader(GL_VERTEX_SHADER);
    f = glCreateShader(GL_FRAGMENT_SHADER);

    vs = textFileRead("toon.vert");
    fs = textFileRead("toon.frag");

    const char * ff = fs;
    const char * vv = vs;

    glShaderSource(v, 1, &vv,NULL);
    glShaderSource(f, 1, &ff,NULL);

    free(vs);free(fs);

    glCompileShader(v);
    glCompileShader(f);

    p = glCreateProgram();
    glAttachShader(p,f);
    glAttachShader(p,v);

    glLinkProgram(p);
    //glUseProgram(p);
}

int main(void)
{
    GLFWwindow* window;

    glfwSetErrorCallback(error_callback);

    if (!glfwInit())
        exit(EXIT_FAILURE);

    window = glfwCreateWindow(640, 480, "Simple example", NULL, NULL);

    if (!window)
    {
        glfwTerminate();
        exit(EXIT_FAILURE);
    }

    glfwMakeContextCurrent(window);

    glfwSetKeyCallback(window, key_callback);

    while (!glfwWindowShouldClose(window))
    {
        int height, width;
        float ratio;
        glfwGetFramebufferSize(window, &width, &height);
        ratio = width / (float) height;
        glViewport(0, 0, width, height);
        setShaders();

        glBindAttribLocation(p,0,"vPosition");
        glUseProgram(p);
        /* Now What */

        glfwSwapBuffers(window);
        glfwPollEvents();
    }
    glfwDestroyWindow(window);

    glfwTerminate();
    exit(EXIT_SUCCESS);
}

A:

you "pass vertices into the shaders" by making a draw call, most typically glDrawArrays().
when glDrawArrays() hits, the currently bound vertex array gets sent off to GPU-land.  the vertices will be processed by the currently bound program (which you seem to have figured out) and each vertex attribute will flow into the vertex shader variables based on whether or not the shader variable's attribute index matches the vertex attribute's glVertexAttribPointer() "index" parameter (which you seem on the way to figuring out).
so, look into glVertexAttribPointer() to describe your array of vertices, glEnableAttributeArray() to enable your array of vertices to be sent on the next draw call, and then glDrawArrays() to kick off the party.

