Advertisement

rendering context

Started by April 02, 2002 09:36 AM
1 comment, last by ioda 22 years, 10 months ago
I''d like to have a programm (with borland c++ (in a console) or borland c++ builder 4) which could open and close an opengl windows whithout quitting the program. I was using the glut functions to open, initialize... but i don''t know how to close only the opengl windows. Now i use exit (0) but all is closed. Could you tell me what''s the esayest way to do? (rendering context? : i try to use NEHE in borland prog but i have problem with if (!(hWnd=CreateWindowEx(...) and with other things) Here is my main function int main ( int argc, char** argv ) { /*here i have functions which have no rapport with opengl */ glutInit ( &argc, argv ); glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); glutInitWindowSize ( 640, 480 ); glutCreateWindow ( argv[0] ); init ( ); glutReshapeFunc ( reshape ); glutMouseFunc ( mouse ); glutMotionFunc ( motion ); glutKeyboardFunc ( keyboard ); glutSpecialFunc (vSpecial ); glutDisplayFunc ( display ); glutIdleFunc ( idle_func ); glutMainLoop ( ); return 0; }
thx
Advertisement
i found function i need on http://mercury.chem.pitt.edu/~tiho/LinuxFocus/English/March1998/article29.html

and it was easy to do when you know the functions.

This topic is closed to new replies.

Advertisement