OpenGL Still

Sid Kraft 96 Reputation points
2026-07-30T22:55:41.8066667+00:00
			 //open a window
			 void display(void);
			 {
				 glClearColor(1.0f, 0.0f, 0.0f, 1.0f);    // Clear the background of our window to red  
				 glClear(GL_COLOR_BUFFER_BIT);    //Clear the colour buffer (more buffers later on)  
				 glLoadIdentity();   // Load the Identity Matrix to reset our drawing locations  

				 glFlush();    // Flush the OpenGL buffers to the window  
			 }
			 void glutInit(int* argcp, char** argv)
			 {
				 glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH);
				 glutInitWindowPosition(100, 200);
				 //this sets the size for the window
				 glutInitWindowSize(800, 700);
				 //create the window with a title
				 glutCreateWindow("This is a window title");
				 //this is the method that will have all the draw stuff.	
				 glutDisplayFunc(display);
				 glutIdleFunc(display);
				 glutMainLoop();
			 }
Coing the items above, get no errors. When loading, get an error on glutDisplayFunc(display) that says calling an external function, the item display not found?? Been having many issues with the OpenGL window commands, need advice, Sid Kraft
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

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.


1 answer

Sort by: Most helpful
  1. RLWA32 52,801 Reputation points
    2026-07-30T23:12:33.73+00:00

    This looks like exactly the same problem that was answered at https://learn.microsoft.com/en-us/answers/questions/5961746/opengl-glutinit

    By failing to remove the semicolon ending the line containing void display(void); the compiler only recognizes this single line as the declaration of a function that is not defined.

    When the semicolon is removed, the following lines of code will be seen by the compiler as the body of the function.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.