glTexImage2D() error 0x502

Hi,

I got problem with glTexImage2D(). Call I placed below causes error 0x502 which I belive is GL_INVALID_OPERATION.

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F_ARB, image.xres, image.yres, 0, GL_RGBA, GL_FLOAT, image.data);

image.data is of type Color[] and Color is defined like this:

struct Color {
    float r, g, b, a;
};

It works with internalFormat GL_RGB, but it’s not good for me.
I want to register this texture with CUDA and for that purpose it has to be 1, 2 or 4 component per element.

InternaFormat GL_RGBA doesn’t work either.

What am I missing? Reference manual doesn’t say much about GL_INVALID_OPERATION (well, it seems to me that, stated possible occurences of this error don’t apply to my case)

Please help,
bootch

I looked at GL_INVALID_OPERATION and I don’t see a reason for it either.

InternaFormat GL_RGBA doesn’t work either.

GL_RGBA causes a GL_INVALID_OPERATION?
because that would be plain old GL_RGBA8 which is available since GL 1.1