资源简介

本资源与我的博客OpenGL CMakeLists对应,提供了例子的完整代码。

资源截图

代码片段和文件信息

#include 
void init(void)
{
    glClearColor(0.0 0.0 0.0 0.0);
    glMatrixMode(GL_PROJECTION);
    glOrtho(-5 5 -5 5 5 15);
    glMatrixMode(GL_MODELVIEW);
    gluLookAt(0 0 10 0 0 0 0 1 0);
    return;
}
void display(void)
{
    glClear(GL_COLOR_BUFFER_BIT);
    glColor3f(1.0 0 0);
    glutWireTeapot(3);
    glFlush();
    return;
}
int main(int argc char *argv[])
{
    glutInit(&argc argv);
    glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
    glutInitWindowPosition(0 0);
    glutInitWindowSize(300 300);
    glutCreateWindow(“OpenGL Display“);
    init();
    glutDisplayFunc(display);
    glutMainLoop();
    return 0;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-07-02 12:47  OpenGL_Test\
     目录           0  2018-07-02 12:46  OpenGL_Test\test_5\
     文件         143  2018-07-02 12:46  OpenGL_Test\test_5\main.cpp
     目录           0  2018-07-02 12:16  OpenGL_Test\test_5\build\
     文件       11714  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeCache.txt
     文件        2185  2018-07-02 12:16  OpenGL_Test\test_5\build\cmake_install.cmake
     目录           0  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\
     文件           2  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\progress.marks
     目录           0  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\test_5.dir\
     文件        4492  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\test_5.dir\build.make
     文件         187  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\test_5.dir\depend.internal
     文件          86  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\test_5.dir\link.txt
     文件         605  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\test_5.dir\DependInfo.cmake
     文件          43  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\test_5.dir\progress.make
     文件         223  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\test_5.dir\CXX.includecache
     文件         182  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\test_5.dir\flags.make
     文件         238  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\test_5.dir\cmake_clean.cmake
     文件         146  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\test_5.dir\depend.make
     目录           0  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\CMakeTmp\
     文件        3199  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\Makefile2
     文件         688  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\feature_tests.c
     文件       12696  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\feature_tests.bin
     文件       10011  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\feature_tests.cxx
     目录           0  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\Progress\
     文件           5  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\Progress\1
     文件           2  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\Progress\count.txt
     文件        1676  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\Makefile.cmake
     目录           0  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\3.5.1\
     文件        4556  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\3.5.1\CMakeCXXCompiler.cmake
     文件         402  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\3.5.1\CMakeSystem.cmake
     文件        8640  2018-07-02 12:16  OpenGL_Test\test_5\build\CMakeFiles\3.5.1\CMakeDetermineCompilerABI_C.bin
............此处省略222个文件信息

评论

共有 条评论