Original Post
i can;t figure out hoy to load multiple images with devil in the same frame in opengl. here's the code i use for 1 image. **************************************************************************** void printbmp(void) { ilGenImages(1, &texid); // Generation of one image name // ilBindImage(texid); // Binding of image name // success = ilLoadImage("data\\texture\\ship_1.JPG"); // Loading of image "image.jpg" // glEnable(GL_ALPHA_TEST); //Enable alpha-blending glAlphaFunc(GL_GREATER, 0.21f); if (success) //If no error occured: // { success = ilConvertImage(IL_RGB , IL_UNSIGNED_BYTE); // Convert every colour component into //unsigned byte. If your image contains alpha channel you can replace IL_RGB with IL_RGBA // if (!success) { printf("Texture not found"); //Error occured // kill(); } // iluNegative(); glGenTextures(1, ℑ); // Texture name generation // glBindTexture(GL_TEXTURE_2D, image); // Binding of texture name // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // We will use linear // interpolation for magnification filter // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); // We will use linear // interpolation for minifying filter // glTexImage2D(GL_TEXTURE_2D, 0, ilGetInteger(IL_IMAGE_BPP), ilGetInteger(IL_IMAGE_WIDTH), ilGetInteger(IL_IMAGE_HEIGHT), 0, ilGetInteger(IL_IMAGE_FORMAT), GL_UNSIGNED_BYTE, ilGetData()); // Texture specification // } else { kill(); } ilDeleteImages(1, &texid); // Because we have already copied image data into texture data //we can release memory used by image. // } ***************************************************************************** please modify it as necessary so that i can use more than 1 image, i am a noob and never used devil before. any other working code showing 2 pics using devil is also welcome.