-
Image Blitting
What I would like to do is take a simple array of RGB values (eg. "unsigned char image[xsize * ysize * 3];")
and be able to copy it directly on the screen.
Is there a simple way of doing this? I tried doing so using glDrawPixels but to no avail - I don't quite understand what format the data needs to be in.
Thanks in advance
-
Advanced Member
Frequent Contributor
Re: Image Blitting
glDrawpixels will work with your data.
(the type is GL_UNSIGNED_BYTE and your format is GL_RGB).
cheers,
John
-
Advanced Member
Frequent Contributor
Re: Image Blitting
GLUbyte *data;
/* data = malloc..... */
glDrawPixels(......, data);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules