Hello,
I work with OpenGL 3.3.
I try to create an OpenGL texture with a size defined by the user. After calling glTexImage2D I call glGetError. If there is an error I give a message to the user and ask him to create a smaller texture.

It works fine on a Linux (32 bits) with an Nvidia GeForce GTX 580 video card.
When I try this on Macintosh (OSX 10.9.2) with an ATI Radeon HD 5670 512 Mo the error catching doesn’t work:
If the texture is small it works, I can create texture and have good render.
But if the texture is too big, the glGetError returns no error; my render is grey or indeterminate. Sometimes the error GL_OUT_OF_MEMORY is detected during the swap buffer (long time after the glTexImage2D and randomly).
After its creation the width of the texture returned by glGetTexLevelParameteriv is correct.

Have you got any ideas ?

Thanks in advance.