OpenGL


9. 3D - 5


{

if (TextureImage[0]->data)//

{

//

free(TextureImage[0]->data);

}


free(TextureImage[0]);//

}


return Status;//

}

OpenGL , . Z- ( ) , : glDepthFunc(GL_LEQUAL); glEnable(GL_DEPTH_TEST); , , . .

int InitGL(GLvoid)// OpenGL

{

if (!LoadGLTextures())//

{

return FALSE;// , FALSE

}


glEnable(GL_TEXTURE_2D);//

// ( )

glShadeModel(GL_SMOOTH);

glClearColor(0.0f, 0.0f, 0.0f, 0.5f);//

glClearDepth(1.0f);// (Depth Buffer)

//

glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);

//

glBlendFunc(GL_SRC_ALPHA,GL_ONE);

glEnable(GL_BLEND);//

. , . , . 50 . star[1] , - star[1].angle={ }. !

for (loop=0; loop<num; loop++)//