Is there an easy and fast way to create an uninitialized texture in OpenGL?
My current approach looks like this:
std::vector<byte> nothing = std::vector<byte>([size of texture in bytes]);
glTexImage(
target,
level,
internalFormat,
size,
border,
format,
type,
nothing
);
but this involves the upload of nothing.
Another approach would be to create an uninitialized buffer (by calling glBufferData without data) and to create the texture from this buffer. But afaik this has twice the memory footprint (and i am on a low memory budget).
Is there a good way to create a texture that will be written to later without using bandwidth or extra memory?