Draw an ofTexture to a NSView

Hello all! I don’t know if this is the right place to place this questions.
I’ve been able to adapt Vanderlin’s example for using openframeworks with Interface Builder. Now I need to be able to dray ofTextures onto NSViews.

I’ve tried to copy an opengl texture onto a NSBitmapImageRep but it didn’t worked.
Here is the code:
glBindTexture(GL_TEXTURE_2D, textureData.textureName[1]);
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGB, GL_UNSIGNED_BYTE, &pixels);
bps = 8;
NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes: (unsigned char**) pixels pixelsWide:visual->texture.getWidth()
pixelsHigh:visual->texture.getHeight() bitsPerSample:8 samplesPerPixel:3 hasAlpha:NO isPlanar:YES colorSpaceName:NSDeviceRGBColorSpace bytesPerRow:8*visual->texture.getWidth() bitsPerPixel:8 ];

NSImage *image = [[NSImage alloc] init];
[image addRepresentation:bitmap];
[image drawAtPoint:NSMakePoint(0, 0) fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0];

can anyone help me out with this problem?