91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 30.16MB
    文件類型: .7z
    金幣: 1
    下載: 0 次
    發布日期: 2023-06-28
  • 語言: 其他
  • 標簽: OpenGL??源碼??第五版??

資源簡介

OpenGL超級寶典(第五版)(傳說中的藍寶書)源碼

資源截圖

代碼片段和文件信息

/*?CallbackMaker.c?*/
/*
?*?Program?to?invoke?all?the?callbacks?that?“freeglut“?supports
?*/


#include?
#include?
#include?
#include?

static?int?sequence_number?=?0?;

int?reshape_called?=?0?key_called?=?0?special_called?=?0?visibility_called?=?0
????keyup_called?=?0?specialup_called?=?0?joystick_called?=?0?mouse_called?=?0
????mousewheel_called?=?0?motion_called?=?0?passivemotion_called?=?0?entry_called?=?0
????close_called?=?0?overlaydisplay_called?=?0?windowstatus_called?=?0
????spacemotion_called?=?0?spacerotation_called?=?0?spacebutton_called?=?0
????buttonbox_called?=?0?dials_called?=?0?tabletmotion_called?=?0?tabletbutton_called?=?0
????menudestroy_called?=?0?menustatus_called?=?0?;
int?reshape_width?=?-1?reshape_height?=?-1?reshape_seq?=?-1?;
int?key_key?=?-1?key_x?=?-1?key_y?=?-1?key_seq?=?-1?;
int?special_key?=?-1?special_x?=?-1?special_y?=?-1?special_seq?=?-1?;
int?visibility_vis?=?-1?visibility_seq?=?-1?;
int?keyup_key?=?-1?keyup_x?=?-1?keyup_y?=?-1?keyup_seq?=?-1?;
int?specialup_key?=?-1?specialup_x?=?-1?specialup_y?=?-1?specialup_seq?=?-1?;
int?joystick_a?=?-1?joystick_b?=?-1?joystick_c?=?-1?joystick_d?=?-1?joystick_seq?=?-1?;??/*?Need?meaningful?names?*/
int?mouse_button?=?-1?mouse_updown?=?-1?mouse_x?=?-1?mouse_y?=?-1?mouse_seq?=?-1?;
int?mousewheel_number?=?-1?mousewheel_direction?=?-1?mousewheel_x?=?-1?mousewheel_y?=?-1?mousewheel_seq?=?-1?;
int?motion_x?=?-1?motion_y?=?-1?motion_seq?=?-1?;
int?passivemotion_x?=?-1?passivemotion_y?=?-1?passivemotion_seq?=?-1?;

static?void
bitmapPrintf?(const?char?*fmt?...)
{
????static?char?buf[256];
????va_list?args;

????va_start(args?fmt);
#if?defined(WIN32)?&&?!defined(__CYGWIN__)
????(void)?_vsnprintf?(buf?sizeof(buf)?fmt?args);
#else
????(void)?vsnprintf?(buf?sizeof(buf)?fmt?args);
#endif
????va_end(args);
????glutBitmapString?(?GLUT_BITMAP_HELVETICA_12?(unsigned?char*)buf?)?;
}


static?void?
Display(void)
{
??int?window?=?glutGetWindow?()?;
??glClear?(?GL_COLOR_BUFFER_BIT?);

??glDisable?(?GL_DEPTH_TEST?);
??glMatrixMode?(?GL_PROJECTION?);
??glPushMatrix();
??glLoadIdentity();
??glOrtho(0?glutGet?(?GLUT_WINDOW_WIDTH?)?
??????????0?glutGet?(?GLUT_WINDOW_HEIGHT?)?-1?1?);
??glMatrixMode?(?GL_MODELVIEW?);
??glPushMatrix?();
??glLoadIdentity?();
??glColor3ub?(?0?0?0?);
??glRasterPos2i?(?10?glutGet?(?GLUT_WINDOW_HEIGHT?)?-?10?);

??if?(?reshape_called?)
??{
????bitmapPrintf?(?“Reshape?%d:??%d?%d\n“?reshape_seq?reshape_width?reshape_height?);
??}

??if?(?key_called?)
??{
????bitmapPrintf?(?“Key?%d:??%d(%c)?%d?%d\n“?key_seq?key_key?key_key?key_x?key_y?);
??}

??if?(?special_called?)
??{
????bitmapPrintf?(?“Special?%d:??%d(%c)?%d?%d\n“?special_seq?special_key?special_key?special_x?special_y?);
??}

??if?(?visibility_called?)
??{
????bitmapPrintf?(?“Visibility?%d:??%d\n“?visibility_seq?visibility_vis?);
??}

??if?(?keyup_called?)
??{
????bitmapPrintf?(?“Key?Up?%d:??%

評論

共有 條評論