glDepthRange(0.0, 1.0);
glClearDepth(1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glClearColor(0.0, 0.0, 0.0, 1.0);
AUX_RGBImageRec *textureImage[1];
textureImage[0] = auxDIBImageLoadA(TEXT("D:/aaa.bmp"));
GLuint texture[1];
glEnable(GL_TEXTURE_2D);
glGenTextures(1, &texture[0]);
glBindTexture(GL_TEXTURE_2D, texture[0]);
glTexParameteri(GL_TEXTURE, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE, GL_TEXTURE_MAG_FILTER,GL_LINEAR);
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, textureImage[0]->sizeX, textureImage[0]->sizeY, GL_RGB, GL_UNSIGNED_BYTE, textureImage[0]->data);
float maxSize = 0.0f;
glGetFloatv(GL_POINT_SIZE_MAX_ARB,&maxSize );
glPointSize( maxSize );
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glBindTexture(GL_TEXTURE_2D, texture[0]);
//glEnable( GL_BLEND );
//glBlendFunc( GL_SRC_ALPHA , GL_ONE );
//float quadratic[] = { 1.0f, 0.0f, 0.01f };
//glPointParameterfvARB(GL_POINT_DISTANCE_ATTENUATION_ARB, quadratic );
//glPointParameterfARB( GL_POINT_FADE_THRESHOLD_SIZE_ARB, 60.0f );
//glPointParameterfARB(GL_POINT_SIZE_MIN_ARB, 13.0);
//glPointParameterfARB(GL_POINT_SIZE_MAX_ARB, 300.0 );
//glTexEnvf(GL_POINT_SPRITE_ARB,GL_COORD_REPLACE_ARB,GL_TRUE);
glEnable( GL_POINT_SPRITE_ARB );
glPointSize(15);
glBegin(GL_POINTS);
//glColor4f(1.0, 0.4, 0.3, 0.6);
glVertex3f(0.0, 0.0, 0.0);
glEnd();
glFlush();