Problems with glTexImage2D

Hello. I’m invoking this functions to load the faces of a CubeMap:(pixeles it’s a ByteBuffer)

gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL.GL_RGBA8, width, height, 0, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, pixeles);

But, after all this calls, pixels’s position is still 0, and I have a black texture :(. Any issue with this call?.

not sure what the exact issue is here, but i was recently building textures procedurally, and delivering bytebuffers to the glTexImage2D as well. i ran into issues of misaligned pixels, nullPointerExceptions, etc. finally, i tried different combination of the format and internal formats, and got it to work. in my case i had to switch from RGB to BGR. just something to consider that maybe it’s the formats…