Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Drawing on screen from raw image data

$
0
0

@Regi wrote:

Hi,

I have a fairly simple question which goes back to understanding the basics of how OF works. I have raw data coming in from a camera (unsigned char*). I know it's 640x480, what I don't know is whether it's bpp.

I've been looking into ofImage, ofTexture, ofPixels... and seem to not understand what the easiest way would be to try and get the image drawn.

Using myTexture.loadData(pixelData, 640, 480, GL_RGB) and then myTexture.draw seems to do the trick, the problem is that I get 3 images drawn next to each other and the whole thing crashes after a few seconds. So I'm assuming GL_RGB is not the way to go, unfortunately nothing else works.

Thanks for the help in advance!

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles