Not rendering

The following is the code for drawing a vertex data
from a external. I have the following code.It is reading data from the file. But nothing is being rendered on the screen.kindly tell me what is problem

#include <stdio.h>
#include <GL/glut.h>
#include <GL/gl.h>

float a[24];
void fileread();

void init()
{
glClearColor(0.0,0.0,0.0,0.0);
glShadeModel(GL_SMOOTH);
fileread();
}
void display()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor3f(0.0f,0.0f,1.0f);

glTranslatef(0.0,0.0,4.0f);
glBegin(GL_POINTS);
	glVertex3fv(a);
glEnd();
glFlush();

}
void reshape(int w,int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
if (w <= h)
glOrtho (-3.5, 3.5, -3.5*(GLfloat)h/(GLfloat)w,
3.5*(GLfloat)h/(GLfloat)w, -3.5, 3.5);
else
glOrtho (-3.5*(GLfloat)w/(GLfloat)h,
3.5*(GLfloat)w/(GLfloat)h, -3.5, 3.5, -3.5, 3.5);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
void fileread()
{
int i,j;
FILE fp;
fp = fopen(“test.dat”,“r”);
for(i=0;i<24;i++)
{
fscanf(fp,"%f",&a[i]);
}
for(i=0;i<24;i++)
{
printf("a[%d] = %f
",i,a[i]);
}
}
int main(int argc, char
argv[])
{
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(512,512);
glutInitWindowPosition(50,50);
glutInit(&argc, argv);
glutCreateWindow(argv[0]);
init();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutMainLoop();
return 0;
}

With regards
RAJESH.R

You need:
1- a pixel format
2- at least 1 rendering context
3- a current rendering context

on MSDN search for
SetPixelFormat
wglCreateContext
wglMakeCurrent

take a look at these lessons too: http://nehe.gamedev.net

Oooops, sorry I did not see you are using glut/glaux, I never use them so I’ve no clue about that

glBegin(GL_POINTS);
glVertex3fv(a);
glEnd();

it’s only reading one point.

glBegin(GL_POINTS);
glVertex3fv(&a[0]);
glVertex3fv(&a[3]);
… up to
glVertex3fv(&a[21]);
glEnd();

ought to work

also… looking at your ortho view values, if your points are < -3 or > 3, they aren’t in view and will be clipped. you may have to adjust these to fit your minimum and maximum points.