Corruption heap problems and F12

I am trying to draw a string using GLUT with C ++ - IDE - VS 2008 - but an error occurred:

Windows called a breakpoint in Graphics.exe.

This may be due to a bunch of corruption, which indicates an error in Graphics.exe or any of the DLLs loaded.

It may also be due to the user pressing F12, while Graphics.exe has focus.

There may be more diagnostic information in the output window.

Of course I don't have a breakpoint in my code, this is my code:

#include <glut.h>


void init (void)
{
 glClearColor(1.0,1.0,1.0,0.0);
 glMatrixMode(GL_PROJECTION);
 gluOrtho2D(0.0,200.0,0.0,15.0);
}//end of the function init

void lineSegment(void)
{
 glClear(GL_COLOR_BUFFER_BIT);

 glColor3f(1.0,0.0,0.0);
 // D R A W  A     L I N E 
 glBegin(GL_LINES);

  glVertex2i(180,15);
  glVertex2i(10,145);

 glEnd();

 glFlush();
}//end of the function "lineSegment"
void main(int argc, char** argv)
{
 glutInit(&argc,argv);
 glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
 glutInitWindowPosition(50,100);
 glutInitWindowSize(400,300);
 glutCreateWindow("N.S"); 
 init();
 glutDisplayFunc(lineSegment);
 glutMainLoop();

}//end of the "Main" function

Does anyone know a problem?

+3
source share
3 answers

. , F12 , . . , MSFT . , , F12, , .

, , , . , GL , , - .

+6

, .: F12 , .

, F12 , , . , F12 , - .

0

visual studio C, F12. C, Google - , .

"" , , , .

0

Source: https://habr.com/ru/post/1734688/


All Articles