I think that the problem comes from line :
glCheck(glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size));
opengl indicate me an error at this line. (Invalid argument)
But this function returns the max texture's width and height in the same value ?
Or is it always the same maximum for the texture's width and height ?
My screen is very large but not so hight so....
And I have size problems with rendertextures also, are you sure that you create your textures with the right dimensions ?