If I use a glTexImage2D call to create a texture with a buffer like this:
glTexImage2D(GL_TEXTURE_2D /* target*/,
0 /* level */,
GL_RGBA /* internal format */,
width /* w */,
height /* h */,
0 /* border */,
GL_RGBA /* format (RGBA 4)*/,
GL_UNSIGNED_BYTE /* type */,
buffer /* pixel buffer */);
Can I modify the buffer and expect the texture to change with it?
Or is the texture finalized after the call?
No, OpenGL will create it’s own copy of the texture so you can’t modify it without copying it back and forth (but this also means you’re able to reuse or free the buffer.