..


glut_cb

	#include	"glut_cb.hxx"

	int		main(int argc, char* argv[])
	{
		::glutInitWindowPosition(200,100) ;
		::glutInitWindowSize	(600,400) ;
		::glutInitDisplayMode	(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH) ;
		::glutInit				(&argc,argv) ;
		::glutCreateWindow		(argv[0]) ;
		::glutReshapeFunc		(cb_resize) ;
		::glutDisplayFunc		(cb_display) ;
		::glutKeyboardFunc		(cb_keyboard) ;
		::cb_init				() ;
		::glutMainLoop			() ;
		return	0 ;
		}
	

		...
		::glutKeyboardFunc		(cb_keyboard) ;
		::glutMouseFunc			(cs_mouse) ;
		::cb_init				() ;
		...
	





glut_cv

	#include	"glut_cv.hxx"

	int		main(int argc, char* argv[])
	{
		::glutInitWindowPosition(200,100) ;
		::glutInitWindowSize	(600,400) ;
		::glutInitDisplayMode	(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH) ;
		::glutInit				(&argc,argv) ;
		::glutCreateWindow		(argv[0]) ;
		::glutReshapeFunc		(cv_resize) ;
		::glutDisplayFunc		(cv_display) ;
		::glutKeyboardFunc		(cv_keyboard) ;
		::glutMouseFunc			(cv_mouse) ;
		::glutMotionFunc		(cv_motion) ;
		::cv_init				() ;
		::glutMainLoop			() ;
		return	0 ;
		}
	




glut_cg

	#include	"glut_cg.hxx"
	#include	"gonsa_to.hxx"

	#define		TIMING_DN	1000

	int		main(int argc, char* argv[])
	{
		{
			GonsA	gnsa ;
			{
				tstring	buf ;	buf.resize(1000) ;
				while (std::terr << _T("file ? =") , std::tin.getline(&buf[0],buf.size()))
				{
					tstring	str = buf.c_str() ;
					if		(str == _T("q"))    {	break ;		}
					else if (str == _T("Q"))    {	break ;		}
					str = ::QuotM_Del_All(str) ;
					if (str.empty())            {	continue ;	}
					if (::File_IsNothing(str))  {	continue ;	}
					tstring	in_file = str ;
					gnsa = ::To_GonsA(in_file.c_str()) ;
					gnsa = ::GonsA_Triangulation(gnsa) ;
					gnsa = ::GonsA_CalcNormal   (gnsa) ;
					if (gnsa.size() > 0)        {	break ;		}
					}
				if (gnsa.size() == 0)           {	return	0 ;		}
				}
			::set_GonsA(gnsa) ;
			::set_Extent(::GonsA_GetExtent(gnsa)) ;
			}
		::glutInitWindowPosition(200,200) ;
		::glutInitWindowSize    (600,400) ;
		::glutInitDisplayMode   (GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH) ;
		::glutInit              (&argc,argv) ;
		::glutCreateWindow      (argv[0]) ;
		::glutReshapeFunc       (cv_resize) ;
		::glutDisplayFunc       (cg_display) ;
		::glutKeyboardFunc      (cv_keyboard) ;
		::glutMouseFunc         (cv_mouse) ;
		::glutMotionFunc        (cv_motion) ;
		::glutTimerFunc         (TIMING_DN,cv_timer,TIMING_DN) ;
		::cv_init               () ;
		{
			::glEnable(GL_LIGHTING) ;
			::glEnable(GL_LIGHT0) ;
			}
		::glutMainLoop          () ;
		return	0 ;
		}

	#include	"messbar.cxx"
	


glut_g3

	#include	"enum_g3.hxx"
	#include	"glut_g3.hxx"
	#include	"glut_cg.hxx"
	#include	<iostream>

	int		main(int argc, char* argv[])
	{
		{
			::g3_to_glut(::get_g3_path().c_str()) ;
			::std::tout << dump_g3_list() ;
			}
		::glutInitWindowPosition(200,100) ;
		::glutInitWindowSize	(600,400) ;
		::glutInitDisplayMode	(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH) ;
		::glutInit				(&argc,argv) ;
		::glutCreateWindow		(argv[0]) ;
		::glutReshapeFunc		(cv_resize) ;
		::glutDisplayFunc		(cg_display) ;
		::glutKeyboardFunc		(g3_keyboard) ;
		::glutMouseFunc			(cv_mouse) ;
		::glutMotionFunc		(cv_motion) ;
		::cb_init				() ;
		::glutMainLoop			() ;
		return	0 ;
		}

	#include	"messbar.cxx"