乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      fedora23 安裝OpenGL

       天天向上wish 2017-06-22
      sudo dnf install mesa-libGL-devel mesa-libGLU-devel
      sudo dnf install freeglut-devel
      • 1
      • 2
      • 1
      • 2

      就齊活了。
      竟然如此的簡(jiǎn)單,如此的順利。

      接下來(lái)就是運(yùn)行測(cè)試程序。

        1 #include<GL/glut.h>
        2 
        3 
        4 void init(void)
        5 {
        6   glClearColor(0.0, 0.0, 0.0, 0.0);
        7   glMatrixMode(GL_PROJECTION);
        8   glOrtho(-5, 5, -5, 5, 5, 15);
        9   glMatrixMode(GL_MODELVIEW);
       10   gluLookAt(0, 0, 10, 0, 0, 0, 0, 1, 0);
       11 }
       12 
       13 void display(void)
       14 {
       15   glClear(GL_COLOR_BUFFER_BIT);
       16   glColor3f(1.0, 0, 0);
       17   glutWireTeapot(3);
       18   //glutWireIcosahedron();
       19   glFlush();
       20 }
       21 
       22 int main(int argc, char *argv[])
       23 {
       24   glutInit(&argc,argv);
       25   glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
       26   glutInitWindowPosition(0, 0);
       27   glutInitWindowSize(300, 300);
       28   glutCreateWindow("OpenGL 3D View");
       29   init();
       30   glutDisplayFunc(display);
       31   
       32   glutMainLoop();
       33   
       34   return 0;
       35 }
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35

      然后編譯

      gcc -o test example.c -lGL -lGLU -lglut
      • 1
      • 1

      運(yùn)行效果如下圖
      這里寫圖片描述

      開(kāi)始感覺(jué)有些神奇,就這么幾行代碼就出來(lái)個(gè)茶壺?仔細(xì)看函數(shù)名才知道,這玩意兒早已經(jīng)內(nèi)置了,直接調(diào)用接口就行了。

      附上一個(gè)學(xué)習(xí)的鏈接 參考教程

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶 評(píng)論公約

        類似文章 更多