If i save a cubemap texture in an image like so:
Positive_x
Negative_X
positive_y
negative_y
positive_z
negative_z
could i load it with the code:
int subheight=img_height/6;
ByteBuffer buf = ByteBuffer.allocate(img_width*img_height*bpp);
//load image into buf here
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);
Or will i have to use separate buffers?