PDA

View Full Version : updating window



jayaprakash
02-17-2009, 05:37 AM
Hi all,

I am using openGL in my application for displaying only.
I have two C files in my project. I wnated to initialize window and creating window in main C file and i wnated to update the window from another C file. Is it possible?
I used in the following way then window is creating but window is not updating with new data. just itis stationary.
In main.c
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(720,480);
glutInitWindowPosition(100,100);
getwin = glutCreateWindow(argv[0]);
init();
In another C file
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutMouseFunc(mouse);
glutIdleFunc(startDisplay);
glutMouseFunc(Key);
glutMainLoop();
Is there any other ways to do for this.
Please suggest me.

Thanks & Regards,
Jayaprakash