1 2 3 4 5 6 7 8 9 10 11
| int subheight=img_height/6; ByteBuffer buf = ByteBuffer.allocate(img_width*img_height*bpp);
public static void glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X,0,format,img_width,subheight,0,format,datatype,buf); public static void glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_X,0,format,img_width,subheight,0,format,datatype,buf); public static void glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Y,0,format,img_width,subheight,0,format,datatype,buf); public static void glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,0,format,img_width,subheight,0,format,datatype,buf); public static void glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Z,0,format,img_width,subheight,0,format,datatype,buf); public static void glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,0,format,img_width,subheight,0,format,datatype,buf); |