OpenGL


9. 3D - 4



if (!Filename)//

{

return NULL;// , NULL

}


File=fopen(Filename,"r");//


if (File)// ?

{

fclose(File);// ,

// AUX,

return auxDIBImageLoad(Filename);

}

// , NULL

return NULL;

}

( ) . Status .

int LoadGLTextures()//

{

int Status=FALSE;//


AUX_RGBImageRec *TextureImage[1];//


memset(TextureImage,0,sizeof(void *)*1);// NULL


// , ,

if (TextureImage[0]=LoadBMP("Data/Star.bmp"))

{

Status=TRUE;// TRUE


glGenTextures(1, &texture[0]);//


// (Linear Filtered)

glBindTexture(GL_TEXTURE_2D, texture[0]);

glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);

glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);

glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX,

TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);

}


if (TextureImage[0])//