Hi,
I do not want use the Devil loader for image.
I use pixelgrabber to store the image data in an integer pixel.
please help me how to load the int[] pixel data containing A,R,G,B info on 32 bits into the glTexImage2D
thanks
int[] texture=texture[100] // 100 textures maximum
void loadtexture(int[] pixel) // the pixel array generated by pixel grabber (contain an int for ARGB)
{
GL11.glPixelStorei (GL11.GL_UNPACK_ALIGNMENT, 1);
GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture[texcompt]);
//texcompt is counter for the texture number
GL11.glTexParameteri(GL11.GL_TEXTURE_2D,GL11.GL_TEXTURE_MAG_FILTER,GL11.GL_LINEAR);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D,GL11.GL_TEXTURE_MIN_FILTER,GL11.GL_LINEAR);
IntBuffer data = IntBuffer.allocate(pixel.length);
data.put(pixel);
data.rewind();
GL11.glTexImage2D(GL11.GL_TEXTURE_2D,0,GL11.GL_RGBA,width,height,0,GL11.GL_RGBA,GL11.GL_UNSIGNED_BYTE,data);
}