If "not in immediate mode" you want to load your geometry onto a graphics card and make calls to render it, then there are several ways to do this. The simplest is to use a display list to precompile the list of OpenGL commands to execute
Gluint list = glGenLists(1);
glNewList(list,GL_COMPILE);
glEndList();
Then visualize it with
glCallList(list);
( , GLEW). VBO, OpenGL:
float data[2] = {...};
GLuint buffer;
glGenBuffersARB(1,&buffer);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, buffer);
glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(data), data, GL_STATIC_DRAW_ARB);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
-
GLuint indices[] = {0};
glBindBufferARB(GL_ARRAY_BUFFER_ARB, buffer);
glVertexPointer(3, GL_FLOAT, sizeof(float)*2, ((GLubyte*)NULL)+0);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawElements(GL_POINTS,sizeof(indices)/(sizeof(indices[0])),GL_UNSIGNED_INT,indices);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
( ). , , .
, , ( 10 100 , ) , .