zoukankan      html  css  js  c++  java
  • win7-opengl开发环境的搭建

    1. glut的安装:

    下载glutdlls37beta.zip,下载链接直接opengl.org上找。

    把glut.h 复制到include下;

    glut.lib, glut32.lib复制到C:Program Files (x86)Microsoft Visual Studio 10.0VClib下;

    将glut.dll和glut32.dll复制到C:WindowsSysWOW64(32位放在C:WindowsSystem32)下。

     在工程中的链接器里面输出项目加入opengl32.lib, glu32.lib, glut32.lib

    2. glew的安装和glut一样,略

    3.

    #include <GL/glew.h>

    #include <glut.h>

    #pragma comment(lib, "glew32.lib")

    void init(){

    ...

    }

    void display(){...}

    void reshape(GLint h, GLint w){...}

    int main()

    {

        glutInit();// step1. 

        glutInitDisplayMode();  //step2

        glutInitWindowPosition(); 

     glutInitWindowSize();//step3

      glutCreateWindow(); //step4

      glewInit();  //step5

      init();

      glutDisplayFunc(display);  //step6

      glutReshapeFunc(reshape);  //step7

      glutMainLoop();    //step8  

    }

  • 相关阅读:
    20210420
    20210419
    2021041601
    20210416
    20210415
    20210414
    20210413
    20210412
    20210409
    20210405
  • 原文地址:https://www.cnblogs.com/bubbler/p/3444150.html
Copyright © 2011-2022 走看看