Guest User

Untitled

a guest
May 27th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. int sys_glWidth = 480;
  2. int sys_glHeight = 320;
  3.  
  4. unsigned char *buffer;
  5.  
  6. buffer = (unsigned char *)malloc(sys_glWidth*sys_glHeight*3);
  7.  
  8. glReadPixels (0, 0, sys_glWidth, sys_glHeight, GL_RGB, GL_UNSIGNED_BYTE, buffer);
  9.  
  10. glBindTexture(GL_TEXTURE_2D, transitionTexture);
  11. glTexImage2D(GL_TEXTURE_2D, 0, 3, sys_glWidth, sys_glHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, buffer);
  12.  
  13. free(buffer);
Add Comment
Please, Sign In to add comment