I'm trying to create single-channel (no mipmaps) texture initialized with my custom pixel data, but it crashes on glTextureSubImage2D. Any idea why?
const std::vector<GLubyte> myData(1025 * 1025, 0);
GLuint texture;
glCreateTextures(GL_TEXTURE_2D, 1, &texture);
glTextureStorage2D(texture, 1, GL_R8, 1025, 1025);
glTextureSubImage2D(texture, 0, 0, 0, 1025, 1025, GL_RED, GL_UNSIGNED_BYTE, &myData[0]);