I'd really like to understand this, but the documentation doesn't make it clear for me. Say I want to write 32-bit integers to a framebuffer, I don't have any pixel data to load to the texture, I'm just creating a framebuffer.

```
void glTexImage2D(  GLenum target,
    GLint level,
    GLint internalformat,
    GLsizei width,
    GLsizei height,
    GLint border,
    GLenum format,
    GLenum type,
    const void * data);

```

The documentation implies that the last two enums, format and type are for knowing what type of data the pixel data is that's being read in, and the internalFormat is what's used to know in what format to store the texture that you created. I thought in cases where you don't provide any texture data the last arguments, or at least one of them aren't used, however I tried changing them to other enum values and I get an error, probably because they were completely wrong enums for that particular argument.

In what cases are the last two enums not used? 
Which one of the three enum values are the ones that decide how the texture is sampled in a shader for example?

Let's just say that I create two example framebuffers. 

```
glTexImage2D(GL_TEXTURE_2D, 0, GL_R32I, width, height, 0, GL_RED_INTEGER, GL_INT, NULL);

```

The idea is that I want to write integer values to this framebuffer, so in the fragment shader I do:

```
out int outIntValue

int main()
{
     outIntValue = 7;
     // not 
     // outIntValue.r = 7; 
     right?
}

```

and I sample it like:

```
layout (binding = 0) uniform isampler2D texture1;

int main()
{
    int val = texture(texture1, vec2(0.5, 0.5).r; // .r right?
}

```

In the case of a 32-bit float framebuffer I create it like:

```
glTexImage2D(GL_TEXTURE_2D, 0, GL_R32F, width, height, 0, GL_RED, GL_FLOAT, NULL);

```

I write to it like this:

```
out int outFloatValue;

int main()
{
    outFloatValue = 0.7;
    // not
    // outFloatValue.r = 0.7; 

}

```

and sample like this:

```
layout (binding = 0) uniform sampler2D texture1;

int main()
{
    float val = texture(texture1, vec2(0.5, 0.5).r; // .r right?
}

```

Also in which of these two cases do the last two enum values do nothing? Thanks.