How to use single channel alpha texture?

I have create a single channel alpha image:

mask1 = new unsigned char[720* 480];

for(unsigned int i = 0; i < 480; i++) {
        for(unsigned int j = 0; j < 720; j++) {
              mask1[i * 480 + j] = alpha;

and load it using:

glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, 720, 480, 0, GL_ALPHA,
                 GL_UNSIGNED_BYTE, mask1);


glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, 720, 480, 0, GL_RED,
                 GL_UNSIGNED_BYTE, mask1);

in glsl:

vec4 color.r = texture(alpha_mask, v_texCoord).a;

v_texCoord is the four corner (0,0 -> 1,1), but the output image is much smaller;.

If you want your texture to match the size of the image, you have to make the geometry matches the image size. For example, drawing a rectangle of 720*480 pixels on the screen. This requires to use an orthographic projection matching the size of your window (and viewport).

For more information go on a tutorial or on any other tutorial about texturing.