亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? texture.c

?? 圖形學課件 圖形學課件 圖形學課件
?? C
?? 第 1 頁 / 共 3 頁
字號:
    glColor3ub(0, 255, 128);        if (wrapt == GL_REPEAT) {        drawstr(360, 200, "GL_REPEAT");    } else {        drawstr(360, 200, "GL_CLAMP");    }        glColor3ub(255, 255, 255);    glGetFloatv(GL_CURRENT_RASTER_POSITION, pos);     drawstr(pos[0]+2, glutGet(GLUT_WINDOW_HEIGHT)-pos[1]-1, ");");    glColor3ub(0, 255, 128);        if (env == GL_MODULATE) {        drawstr(360, 220, "GL_MODULATE");    } else if (env == GL_DECAL) {        drawstr(360, 220, "GL_DECAL");    } else if (env == GL_BLEND) {        drawstr(360, 220, "GL_BLEND");    } else {        drawstr(360, 220, "GL_REPLACE");    }        glColor3ub(255, 255, 255);    glGetFloatv(GL_CURRENT_RASTER_POSITION, pos);     drawstr(pos[0]+2, glutGet(GLUT_WINDOW_HEIGHT)-pos[1]-1, ");");        setfont("helvetica", 18);        cell_draw(&bcolor[0]);    cell_draw(&bcolor[1]);    cell_draw(&bcolor[2]);    cell_draw(&bcolor[3]);        cell_draw(&ecolor[0]);    cell_draw(&ecolor[1]);    cell_draw(&ecolor[2]);    cell_draw(&ecolor[3]);        if (!selection) {        glColor3ub(255, 255, 0);        drawstr(10, 525,            "Click on the arguments and move the mouse to modify values.");    }           glutSwapBuffers();}voidpolygon_mouse(int x, int y){/* mouse should only hit _one_ of the cells, so adding up all    the hits just propagates a single hit. */    selection += cell_hit(&texcoords[0], x, y);    selection += cell_hit(&texcoords[1], x, y);    selection += cell_hit(&texcoords[2], x, y);    selection += cell_hit(&texcoords[3], x, y);    selection += cell_hit(&texcoords[4], x, y);    selection += cell_hit(&texcoords[5], x, y);    selection += cell_hit(&texcoords[6], x, y);    selection += cell_hit(&texcoords[7], x, y);    selection += cell_hit(&vertices[0], x, y);    selection += cell_hit(&vertices[1], x, y);    selection += cell_hit(&vertices[2], x, y);    selection += cell_hit(&vertices[3], x, y);    selection += cell_hit(&vertices[4], x, y);    selection += cell_hit(&vertices[5], x, y);    selection += cell_hit(&vertices[6], x, y);    selection += cell_hit(&vertices[7], x, y);    selection += cell_hit(&vertices[8], x, y);    selection += cell_hit(&vertices[9], x, y);    selection += cell_hit(&vertices[10], x, y);    selection += cell_hit(&vertices[11], x, y);    selection += cell_hit(&pcolor[0], x, y);    selection += cell_hit(&pcolor[1], x, y);    selection += cell_hit(&pcolor[2], x, y);    selection += cell_hit(&pcolor[3], x, y);}voidmatrix_mouse(int button, int state, int x, int y){    selection = 0;        if (state == GLUT_DOWN) {        polygon_mouse(x, y);        /* mouse should only hit _one_ of the cells, so adding up all        the hits just propagates a single hit. */        selection += cell_hit(&translation[0], x, y);        selection += cell_hit(&translation[1], x, y);        selection += cell_hit(&translation[2], x, y);        selection += cell_hit(&rotation[0], x, y);        selection += cell_hit(&rotation[1], x, y);        selection += cell_hit(&rotation[2], x, y);        selection += cell_hit(&rotation[3], x, y);        selection += cell_hit(&scale[0], x, y);        selection += cell_hit(&scale[1], x, y);        selection += cell_hit(&scale[2], x, y);    }        old_y = y;        redisplay_all();}voidparameters_mouse(int button, int state, int x, int y){    selection = 0;        if (state == GLUT_DOWN) {        polygon_mouse(x, y);        selection += cell_hit(&bcolor[0], x, y);        selection += cell_hit(&bcolor[1], x, y);        selection += cell_hit(&bcolor[2], x, y);        selection += cell_hit(&bcolor[3], x, y);        selection += cell_hit(&ecolor[0], x, y);        selection += cell_hit(&ecolor[1], x, y);        selection += cell_hit(&ecolor[2], x, y);        selection += cell_hit(&ecolor[3], x, y);        if (!selection) {            if (y < 145 && y > 125) {                if (minfilter == GL_NEAREST)                    minfilter = GL_LINEAR;                else if (minfilter == GL_LINEAR)                    minfilter = GL_NEAREST_MIPMAP_NEAREST;                else if (minfilter == GL_NEAREST_MIPMAP_NEAREST)                    minfilter = GL_NEAREST_MIPMAP_LINEAR;                else if (minfilter == GL_NEAREST_MIPMAP_LINEAR)                    minfilter = GL_LINEAR_MIPMAP_NEAREST;                else if (minfilter == GL_LINEAR_MIPMAP_NEAREST)                    minfilter = GL_LINEAR_MIPMAP_LINEAR;                else                     minfilter = GL_NEAREST;            } else if (y < 165 && y > 145) {                if (magfilter == GL_NEAREST)                    magfilter = GL_LINEAR;                else                    magfilter = GL_NEAREST;            } else if (y < 185 && y > 165) {                if (wraps == GL_REPEAT)                    wraps = GL_CLAMP;                else                    wraps = GL_REPEAT;            } else if (y < 205 && y > 185) {                if (wrapt == GL_REPEAT)                    wrapt = GL_CLAMP;                else                    wrapt = GL_REPEAT;            } else if (y < 225 && y > 205) {                if (env == GL_REPLACE_EXT)                    env = GL_DECAL;                else if (env == GL_DECAL)                    env = GL_BLEND;                else if (env == GL_BLEND)                    env = GL_MODULATE;                else                    env = GL_REPLACE_EXT;            }        }    }        glutSetWindow(screen);    texenv();    glutSetWindow(world);    texenv();        old_y = y;        redisplay_all();}voidcommand_motion(int x, int y){    cell_update(&translation[0], old_y-y);    cell_update(&translation[1], old_y-y);    cell_update(&translation[2], old_y-y);    cell_update(&rotation[0], old_y-y);    cell_update(&rotation[1], old_y-y);    cell_update(&rotation[2], old_y-y);    cell_update(&rotation[3], old_y-y);    cell_update(&scale[0], old_y-y);    cell_update(&scale[1], old_y-y);    cell_update(&scale[2], old_y-y);    cell_update(&texcoords[0], old_y-y);    cell_update(&texcoords[1], old_y-y);    cell_update(&texcoords[2], old_y-y);    cell_update(&texcoords[3], old_y-y);    cell_update(&texcoords[4], old_y-y);    cell_update(&texcoords[5], old_y-y);    cell_update(&texcoords[6], old_y-y);    cell_update(&texcoords[7], old_y-y);    cell_update(&vertices[0], old_y-y);    cell_update(&vertices[1], old_y-y);    cell_update(&vertices[2], old_y-y);    cell_update(&vertices[3], old_y-y);    cell_update(&vertices[4], old_y-y);    cell_update(&vertices[5], old_y-y);    cell_update(&vertices[6], old_y-y);    cell_update(&vertices[7], old_y-y);    cell_update(&vertices[8], old_y-y);    cell_update(&vertices[9], old_y-y);    cell_update(&vertices[10], old_y-y);    cell_update(&vertices[11], old_y-y);    cell_update(&pcolor[0], old_y-y);    cell_update(&pcolor[1], old_y-y);    cell_update(&pcolor[2], old_y-y);    cell_update(&pcolor[3], old_y-y);    cell_update(&bcolor[0], old_y-y);    cell_update(&bcolor[1], old_y-y);    cell_update(&bcolor[2], old_y-y);    cell_update(&bcolor[3], old_y-y);    cell_update(&ecolor[0], old_y-y);    cell_update(&ecolor[1], old_y-y);    cell_update(&ecolor[2], old_y-y);    cell_update(&ecolor[3], old_y-y);        glutSetWindow(screen);    texenv();    glutSetWindow(world);    texenv();        old_y = y;        redisplay_all();}voidtimer(int value){    stipple = 0x00ff << value;    if (value > 8)        stipple += 0x00ff >> (8-(value-8));        value++;    if (value >= 16)        value = 0;        glutSetWindow(world);    glutPostRedisplay();        glutTimerFunc(100, timer, value);}voidredisplay_all(void){    glutSetWindow(command);    glutPostRedisplay();    glutSetWindow(world);    world_reshape(sub_width, sub_height);    glutPostRedisplay();    glutSetWindow(screen);    screen_reshape(sub_width, sub_height);    glutPostRedisplay();}voidmain_keyboard(unsigned char key, int x, int y){    switch (key) {    case 'm':        glutSetWindow(command);        glutMouseFunc(matrix_mouse);        glutDisplayFunc(matrix_display);        break;    case 'p':        glutSetWindow(command);        glutMouseFunc(parameters_mouse);        glutDisplayFunc(parameters_display);        break;    case 'r':        translation[0].value = 0.0;        translation[1].value = 0.0;        translation[2].value = 0.0;        rotation[0].value = 0.0;        rotation[1].value = 0.0;        rotation[2].value = 0.0;        rotation[3].value = 1.0;        scale[0].value = 1.0;        scale[1].value = 1.0;        scale[2].value = 1.0;        texcoords[0].value = 0.0;        texcoords[1].value = 0.0;        texcoords[2].value = 1.0;        texcoords[3].value = 0.0;        texcoords[4].value = 1.0;        texcoords[5].value = 1.0;        texcoords[6].value = 0.0;        texcoords[7].value = 1.0;        vertices[0].value = -1.0;        vertices[1].value = -1.0;        vertices[2].value = 0.0;        vertices[3].value = 1.0;        vertices[4].value = -1.0;        vertices[5].value = 0.0;        vertices[6].value = 1.0;        vertices[7].value = 1.0;        vertices[8].value = 0.0;        vertices[9].value = -1.0;        vertices[10].value = 1.0;        vertices[11].value = 0.0;        pcolor[0].value = 0.6;        pcolor[1].value = 0.6;        pcolor[2].value = 0.6;        pcolor[3].value = 0.6;        bcolor[0].value = 1.0;        bcolor[1].value = 0.0;        bcolor[2].value = 0.0;        bcolor[3].value = 1.0;        ecolor[0].value = 0.0;        ecolor[1].value = 1.0;        ecolor[2].value = 0.0;        ecolor[3].value = 1.0;        minfilter = GL_NEAREST;        magfilter = GL_NEAREST;        env = GL_MODULATE;        wraps = GL_REPEAT;        wrapt = GL_REPEAT;        break;    case 27:        exit(0);    }        glutSetWindow(screen);    texenv();    redisplay_all();}voidcommand_menu(int value){    main_keyboard((unsigned char)value, 0, 0);}intmain(int argc, char** argv){    image = glmReadPPM("data/fishermen.ppm", &iwidth, &iheight);    if (!image)        exit(0);        glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);    glutInitWindowSize((512+GAP*3)*3/2, 512+GAP*3);    glutInitWindowPosition(50, 50);    glutInit(&argc, argv);        window = glutCreateWindow("Texture");    glutReshapeFunc(main_reshape);    glutDisplayFunc(main_display);    glutKeyboardFunc(main_keyboard);        world = glutCreateSubWindow(window, GAP, GAP, 256, 256);    glutReshapeFunc(world_reshape);    glutDisplayFunc(world_display);    glutKeyboardFunc(main_keyboard);    glutCreateMenu(world_menu);    glutAddMenuEntry("Textures", 0);    glutAddMenuEntry("", 0);    glutAddMenuEntry("Fishermen", 'f');    glutAddMenuEntry("OpenGL Logo", 'o');    glutAddMenuEntry("Checker", 'c');    glutAddMenuEntry("Marble", 'm');    glutAddMenuEntry("Train", 't');    glutAttachMenu(GLUT_RIGHT_BUTTON);        texture();        screen = glutCreateSubWindow(window, GAP+256+GAP, GAP, 256, 256);    glutReshapeFunc(screen_reshape);    glutDisplayFunc(screen_display);    glutKeyboardFunc(main_keyboard);    glutMotionFunc(screen_motion);    glutMouseFunc(screen_mouse);        texture();        command = glutCreateSubWindow(window, GAP+256+GAP, GAP+256+GAP, 256, 256);    glutReshapeFunc(command_reshape);    glutMotionFunc(command_motion);    glutDisplayFunc(parameters_display);    glutMouseFunc(parameters_mouse);    glutKeyboardFunc(main_keyboard);    glutCreateMenu(command_menu);    glutAddMenuEntry("Texture", 0);    glutAddMenuEntry("", 0);    glutAddMenuEntry("Matrix", 'm');    glutAddMenuEntry("Environment/Parameters", 'p');    glutAddMenuEntry("Reset parameters (r)", 'r');    glutAddMenuEntry("", 0);    glutAddMenuEntry("Quit", 27);    glutAttachMenu(GLUT_RIGHT_BUTTON);        redisplay_all();        glutTimerFunc(500, timer, 0);    glutMainLoop();    return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美丰满高潮xxxx喷水动漫| 国产精品剧情在线亚洲| 久久久久97国产精华液好用吗| 亚洲精品成人少妇| 国产一区视频在线看| 欧美午夜一区二区三区 | 亚洲欧美日韩在线播放| 麻豆国产91在线播放| 一本到不卡精品视频在线观看| 亚洲精品一线二线三线| 日韩成人午夜精品| 在线观看一区日韩| 中文字幕一区在线观看| 国产精品一二三在| 精品国产制服丝袜高跟| 美美哒免费高清在线观看视频一区二区 | 欧美色综合网站| 亚洲国产精品成人综合 | 亚洲午夜国产一区99re久久| 懂色av中文字幕一区二区三区| 欧美一区二区三区公司| 亚洲香肠在线观看| 日本久久电影网| 亚洲乱码日产精品bd| 一本色道a无线码一区v| 国产精品乱人伦| 成人av在线一区二区三区| 中文字幕av不卡| 国产成人av电影在线播放| 久久精品视频免费观看| 国产一区二区三区黄视频| 精品久久久久香蕉网| 麻豆一区二区在线| 亚洲精品在线观看网站| 蜜臂av日日欢夜夜爽一区| 3atv一区二区三区| 久久精品国产一区二区| 久久亚洲二区三区| 国产高清亚洲一区| 国产欧美日韩中文久久| 暴力调教一区二区三区| 亚洲男人的天堂av| 在线亚洲一区观看| 日韩影院精彩在线| 久久久久久毛片| 成人在线综合网站| 亚洲欧美一区二区久久| 日本韩国欧美三级| 视频精品一区二区| 欧美成人猛片aaaaaaa| 国产成人夜色高潮福利影视| 国产欧美日本一区视频| 一本一道波多野结衣一区二区| 亚洲男人的天堂一区二区| 欧美精品日韩精品| 麻豆精品在线播放| 国产精品久久久久永久免费观看 | 久久综合色综合88| 91最新地址在线播放| 同产精品九九九| 国产区在线观看成人精品| 色综合久久久网| 美女网站一区二区| 中文字幕巨乱亚洲| 在线播放国产精品二区一二区四区| 久久不见久久见免费视频1| 国产精品网站导航| 51午夜精品国产| av电影在线观看不卡| 五月天精品一区二区三区| 精品日韩欧美一区二区| 久久青草国产手机看片福利盒子| 99riav一区二区三区| 美女视频黄免费的久久| 综合色中文字幕| 欧美zozozo| 在线免费一区三区| 国产精品性做久久久久久| 一区二区三区在线观看国产| 欧美精品一区二区三| 在线亚洲+欧美+日本专区| 国产麻豆欧美日韩一区| 舔着乳尖日韩一区| 中文字幕中文字幕一区二区| 精品国产污污免费网站入口| 欧美图区在线视频| 粗大黑人巨茎大战欧美成人| 久久国产剧场电影| 亚洲成av人综合在线观看| 亚洲欧洲精品一区二区精品久久久| 欧美一区二区在线不卡| 99re6这里只有精品视频在线观看| 毛片av中文字幕一区二区| 亚瑟在线精品视频| 亚洲久草在线视频| 国产精品美女www爽爽爽| 欧美一级一区二区| 欧美色区777第一页| 色香蕉成人二区免费| 99久久精品国产一区| 国产成人亚洲综合色影视| 韩国精品在线观看| 蜜桃视频第一区免费观看| 午夜欧美2019年伦理 | 久久久99精品免费观看| 日韩无一区二区| 91精品国产免费| 欧美日韩在线直播| 一本久久a久久精品亚洲| 91网站在线播放| 91论坛在线播放| 在线一区二区三区四区五区| 色婷婷亚洲综合| 91成人国产精品| 欧美日韩亚洲丝袜制服| 欧美无砖专区一中文字| 欧美人xxxx| 91精品国产一区二区| 69av一区二区三区| 日韩一区二区免费在线观看| 日韩三级在线观看| 久久亚洲二区三区| 国产精品美女久久久久久2018 | 在线看国产一区| 色噜噜狠狠成人中文综合| 91国产免费看| 欧美日韩在线播放三区四区| 欧美精品在线观看一区二区| 在线91免费看| 久久久久久影视| |精品福利一区二区三区| 一区二区三区不卡在线观看 | 伊人开心综合网| 亚洲成a人片在线不卡一二三区| 日韩高清一区在线| 韩国午夜理伦三级不卡影院| 岛国精品一区二区| 色先锋aa成人| 一区二区三区欧美激情| 天天色天天爱天天射综合| 激情综合一区二区三区| 不卡一区二区三区四区| 欧美日韩免费高清一区色橹橹 | 亚洲午夜电影网| 激情五月婷婷综合| 91丝袜美腿高跟国产极品老师| 欧美日韩免费不卡视频一区二区三区| 91麻豆精品国产91久久久 | aaa亚洲精品一二三区| 欧洲一区在线观看| 精品电影一区二区三区 | 欧美曰成人黄网| 日韩免费高清av| 亚洲人妖av一区二区| 奇米影视一区二区三区小说| av网站免费线看精品| 欧美一区二区三区四区久久| 国产欧美一区二区在线| 亚洲国产一区二区在线播放| 国产91色综合久久免费分享| 欧美乱熟臀69xxxxxx| 一色桃子久久精品亚洲| 久久国产精品色婷婷| 欧美性受xxxx| 成人免费视频在线观看| 国产一区二区三区精品视频| 欧美喷潮久久久xxxxx| 中文字幕成人av| 经典三级视频一区| 91麻豆精品国产91久久久久久久久| √…a在线天堂一区| 国产成人自拍网| 欧美成人精精品一区二区频| 亚洲电影中文字幕在线观看| 不卡高清视频专区| 国产午夜精品美女毛片视频| 美女国产一区二区| 欧美精品欧美精品系列| 一级精品视频在线观看宜春院 | 欧美日韩黄视频| 亚洲激情在线激情| 国产不卡在线播放| 久久日一线二线三线suv| 日韩激情一二三区| 欧美性感一区二区三区| 一区二区三区国产| 色噜噜夜夜夜综合网| 中文字幕制服丝袜一区二区三区| 国产二区国产一区在线观看| 欧美zozo另类异族| 精品一区二区免费视频| 欧美一区二区高清| 免播放器亚洲一区| 欧美人体做爰大胆视频| 亚洲国产wwwccc36天堂| 欧美视频三区在线播放| 亚洲一二三区在线观看| 欧美午夜精品一区二区蜜桃| 一区二区三区精品久久久| 日本高清成人免费播放|