A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
The missing graphics output is caused by three separate issues in the code:
No Active Color Set for Vertices: glColor3f(...) (or similar) is never called before drawing lines. By default, OpenGL uses black (0.0, 0.0, 0.0) for geometry, which makes the drawn lines completely invisible against a dark background or obscured if the default state matches the clear color.
Missing Double-Buffering Swap: GLUT defaults to single-buffered display unless GLUT_DOUBLE is specified. However, single-buffered rendering requires glFlush() or glutSwapBuffers() inside the display() function. Since glFlush() is commented out inside display() and instead called prematurely in initWindow(), the rendered commands are never flushed/flushed to the frame buffer.
Array Bounds Overflow in Drawing Loop: The loop evaluates PLOTX[I + 1] up to I == INOW. If INOW is the final valid index of the array, I + 1 reads out of bounds, leading to undefined behavior or silent loop termination before execution finishes.
Resolution & Fixed Code
Set the Geometry Color: Add glColor3f(1.0f, 0.0f, 0.0f); (or another bright color) inside display() prior to glBegin(GL_LINES).
Flush the Render Queue: Uncomment glFlush() inside display(), or switch to double buffering by adding GLUT_DOUBLE to glutInitDisplayMode and replacing glFlush() with glutSwapBuffers().
Fix Array Bounds: Adjust the loop condition to stop at I < INOW so PLOTX[I + 1] stays within valid array limits.
#include <GL/glut.h>