Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GLuint *image; //...read in image from file
- glPixelStorei(GL_UNPACK_SWAP_BYTES,GL_TRUE);
- //using GLubyte and scaling to GL_UNSIGNED_BYTE
- GLubyte * imageScaled = new GLubyte[512*512*3];
- gluScaleImage(GL_RGB, col, row, GL_UNSIGNED_INT, image, 512, 512, GL_UNSIGNED_BYTE, imageScaled);
- glDrawPixels(512, 512, GL_RGB, GL_UNSIGNED_BYTE, imageScaled);
- GLuint *image;//...read in image from file
- glPixelStorei(GL_UNPACK_SWAP_BYTES,GL_TRUE);
- //using GLuint and scaling to GL_UNSIGNED_INT
- GLuint * imageScaled = new GLuint[512*512*3];
- gluScaleImage(GL_RGB, col, row, GL_UNSIGNED_INT, image, 512, 512, GL_UNSIGNED_INT, imageScaled);
- glDrawPixels(512, 512,GL_RGB, GL_UNSIGNED_INT, imageScaled);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement