Hi,

I'm trying to show images from a webcam using OpenGL.
For acquiring images I use OpenCV that returns a IPLImage.
I have created a QOpenGL inherited class that displays the images.
The problem is that the images come as BGR instead of RGB format.
I use this openGL call:
Qt Code:
  1. glTexImage2D(GL_TEXTURE_2D,0,3,iWidth,iHeight,0,GL_RGB,GL_UNSIGNED_BYTE,pcData);
To copy to clipboard, switch view to plain text mode 

I have readed that GL_BGR format should be used but the compiler shows that it's not defined.

I'm using Qt 4.6.1 and Windows XP SP3.

Thanks,