Advertisement

Creating multiple textures...

Started by June 23, 2003 12:19 AM
2 comments, last by skullfire 21 years, 8 months ago
int LoadGLTextures() // Load bitmaps and convert to textures { AUX_RGBImageRec *TextureImage[1]; int Status = false; // Status indicator memset(TextureImage,0,sizeof(void *)*1); // Set the pointer to NULL glGenTextures(3, &texture[0]); // Create three textures glGenTextures(6, &SkyBoxTextures[0]); // Load the bitmap, check for errors, if bitmap''s not found quit Status = ( LoadTexture(TextureImage,texture[0],"Data/splash.bmp") && LoadTexture(TextureImage,texture[1],"Data/grass01.bmp") && LoadTexture(TextureImage,texture[2],"Data/hand.bmp") && LoadTexture(TextureImage,SkyBoxTextures[0],"Data/SkyBox/arcn_bk.bmp")&& LoadTexture(TextureImage,SkyBoxTextures[1],"Data/SkyBox/arcn_ft.bmp")&& LoadTexture(TextureImage,SkyBoxTextures[2],"Data/SkyBox/arcn_dn.bmp")&& LoadTexture(TextureImage,SkyBoxTextures[3],"Data/SkyBox/arcn_up.bmp")&& LoadTexture(TextureImage,SkyBoxTextures[4],"Data/SkyBox/arcn_lf.bmp")&& LoadTexture(TextureImage,SkyBoxTextures[5],"Data/SkyBox/arcn_rt.bmp") ); Thing is, it worked fine until i added the skybox textures. now it just shows a white screen. What could this be? Any tips? I''m planning on loading several textures so i need different variables.
int LoadGLTextures() // Load bitmaps and convert to textures
{
AUX_RGBImageRec *TextureImage[1];
int Status = false; // Status indicator


memset(TextureImage,0,sizeof(void *)*1); // Set the pointer to NULL

glGenTextures(3, &texture[0]); // Create three textures
//edit

// Load the bitmap, check for errors, if bitmap''s not found quit
Status = (
LoadTexture(TextureImage,texture[0],"Data/splash.bmp" &&
LoadTexture(TextureImage,texture[1],"Data/grass01.bmp" &&
LoadTexture(TextureImage,texture[2],"Data/hand.bmp" &&
glGenTextures(6, &SkyBoxTextures[0]); //edit
LoadTexture(TextureImage,SkyBoxTextures[0],"Data/SkyBox/arcn_bk.bmp"&&
LoadTexture(TextureImage,SkyBoxTextures[1],"Data/SkyBox/arcn_ft.bmp"&&
LoadTexture(TextureImage,SkyBoxTextures[2],"Data/SkyBox/arcn_dn.bmp"&&
LoadTexture(TextureImage,SkyBoxTextures[3],"Data/SkyBox/arcn_up.bmp"&&
LoadTexture(TextureImage,SkyBoxTextures[4],"Data/SkyBox/arcn_lf.bmp"&&
LoadTexture(TextureImage,SkyBoxTextures[5],"Data/SkyBox/arcn_rt.bmp"
);
Advertisement
Thing is, i tried that already..didnt werk...damnit
Put all those textures in one large array and see if that fixes your problem.

This topic is closed to new replies.

Advertisement