I am trying to draw a trigonometric graph with OpenGL. This is a part of my code:
double x = -1;
gl.glColor3d(0, 0, 0);
gl.glBegin(gl.GL_LINES);
gl.glVertex2d(x, Math.sin(Math.toRadians(x))*0.01);
gl.glVertex2d(x+0.01, Math.sin(Math.toRadians(x+0.01))*0.01);
gl.glEnd();
x += 0.01;
This part is repeated in my full code. When this is executed, I see nothing. Can anybody tell me why this might be happening?