PDA

View Full Version : Graph using OpenGL



Harish
09-26-2002, 08:07 PM
Hello,

I need to develop a few graphs using OpenGL on Windows using Visual C++. Examples are usual X-Y graph, 2D and 3D Waterfall graph. All the OpenGL samples I have seen so far model some object or other. I have not seen any graphing sample.

If there are any samples, pls point me to them.

Thanks in Advance,
Harish

jono_123
10-01-2002, 12:56 AM
a 2d x-y graph in opengl would not be hard:
glBegin(GL_LINE_STRIP);
for(int x = -10;x <= 10;x++) {
y = x*x;
glVertex2f(x,y);
}
glEnd();
this was just off the top of my head so if it doesnt work email me