hello,
i work with java/jogl opengl and found an
tutorial about cubemap, but the face textures
of the cubemap are only simpel colored textures.
i didnt found a way to load my textures into
the cubemap.
i try google but didnt find anything and the
redbook on opengl.org is offline since a few days
gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL.GL_RGBA,imageSize, imageSize, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE,texture[nr]<-error );
i see that the gltextimage2d want this:
private static ByteBuffer imageBuf1 = BufferUtil.newByteBuffer(imageSize * imageSize * 4);
but how did i copy my textures into that imageBuf1 for example
much thx for any help
…
…
import com.sun.opengl.util.;
import javax.media.opengl.;
import javax.media.opengl.glu.*;
…
Texture[] texture= new Texture[200];
…
//Texture Loader
texture[nr] = TextureIO.newTexture(new File(“gfx/d00”+nr+“.JPG”), true);
texture[nr].bind();
gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR_MIPMAP_NEAREST);
gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, 2);
gl.glTexEnvf(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_MODULATE);
…