> [...]
> > Another way to do this would be to compile an OpenGL application with
> > Mesa. Obviously, this approach only works if the source code is
> > available. Has anybody successfully done this?
> You don't have to compile with Mesa, Mesa just provides libGL and libGLU
> libraries which a normal OpenGL program is already linked to anyway.
> Jonno
First of all, thank you! unfortunetlly i tried to use glutPostRedisplar but
it's not working.
I show you part of my code which belong to AttachMenu part:
int main(int argc, char **argv)
{
int color_id, size_id, fill_id;
glutInit(&argc, argv);
glutInitWindowSize(w_width,w_hight);
glutInitWindowPosition(100,100);
glutInitDisplayMode(GLUT_RGB);
glutCreateWindow("Paint");
glutDisplayFunc(displayPaint);
**********************************Menu
Options************************************************
color_id=glutCreateMenu(Check_Func);
/*10-14 -> Colors*/
glutAddMenuEntry("RED",10);
glutAddMenuEntry("YELLOW",11);
glutAddMenuEntry("BLUE",12);
glutAddMenuEntry("GREEN",13);
glutAddMenuEntry("WHITE",14);
size_id=glutCreateMenu(Check_Func);
/*2-3 -> point size*/
glutAddMenuEntry("Increase Pixel_Size",2);
glutAddMenuEntry("Decrease Pixel_Size",3);
fill_id=glutCreateMenu(Check_Func);
/*0-1 -> 0->empty 1->fiil*/
glutAddMenuEntry("Fill On",1);
glutAddMenuEntry("Fill Of",0);
glutCreateMenu(Check_Func);
glutAddSubMenu("Colors",color_id);
glutAddSubMenu("Size",size_id);
glutAddSubMenu("Fill",fill_id);
glutAddMenuEntry("Clear",4);
glutAddMenuEntry("Exit",5);
*******************************************************
glutAttachMenu(GLUT_RIGHT_BUTTON);
*******************************************************
glutMouseFunc(mouseEvent);
glutKeyboardFunc(Keyboard);
glutReshapeFunc(Resize_Win);
glutMainLoop();
return 0;
Quote:}
I hope its will help you!