Пример #1
0
 protected void fill(GOut g) {
   BGL gl = g.gl;
   Coord dim = new Coord(tdim, tdim);
   for (int i = 0; i < order.length; i++) {
     ByteBuffer data =
         ByteBuffer.wrap(
             TexI.convert(back, dim, new Coord(order[i][0] * tdim, order[i][1] * tdim), dim));
     gl.glTexImage2D(
         GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X + i,
         0,
         GL.GL_RGBA,
         tdim,
         tdim,
         0,
         GL.GL_RGBA,
         GL.GL_UNSIGNED_BYTE,
         data);
   }
 }