glut_cb.hxx を使用したコード

t_c_ut_1.cpp
#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 ;
	}

cs_mouse を使用

t_c_ut_2.cpp
#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) ;
	::glutMouseFunc		(cs_mouse) ;
	::cb_init		() ;
	::glutMainLoop		() ;
	return	0 ;
	}

glut_cv.hxx を使用したコード

t_c_ut_3.cpp
#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 を使用したコードの関数化
t_c_ut.2019.10.31.zip