Guest User

Untitled

a guest
Jul 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. glEnable(GL_TEXTURE_CUBE_MAP);
  2. glGenTextures(1,&cubeMapTexID);
  3. glBindTexture(GL_TEXTURE_CUBE_MAP,cubeMapTexID);
  4. for (int i=0; i<6; i++) {
  5. ...
  6. load image into h_data and set width and heigth
  7. ...
  8.  
  9. glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i,
  10. 0, // level
  11. GL_RGBA, // internal format
  12. width, // width
  13. height, // height
  14. 0, // border
  15. GL_RGBA, // format
  16. GL_UNSIGNED_BYTE, // type
  17. h_data); // pixel data
  18. free(h_data);
  19. }
Add Comment
Please, Sign In to add comment