Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- glEnable(GL_TEXTURE_CUBE_MAP);
- glGenTextures(1,&cubeMapTexID);
- glBindTexture(GL_TEXTURE_CUBE_MAP,cubeMapTexID);
- for (int i=0; i<6; i++) {
- ...
- load image into h_data and set width and heigth
- ...
- glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i,
- 0, // level
- GL_RGBA, // internal format
- width, // width
- height, // height
- 0, // border
- GL_RGBA, // format
- GL_UNSIGNED_BYTE, // type
- h_data); // pixel data
- free(h_data);
- }
Add Comment
Please, Sign In to add comment