Road OpenGL learning (1) - Installation

 I was in the process of learning Qt, the access to 2D, 3D graphics, also saw many projects will combine to make Qt and OpenGL development, but also on the coordinate system foggy Qt inside, he decided to combine the two learn about them.

      OpenGL is a graphics API, not an independent platform, because I was on QT C ++ platform, so it chose C ++ OpenGL as a working language.

       Set up a OpenGl environment, go online to find a video tutorial: Based SDL2.0 library, according to the video configuration environment, knocked a pass code that knocked foggy, coloring occurs when the Bug, there is no theoretical support, Search can not solve it decided to replace the environment.

   SDL2.0 installation environment for Win10 + VS2017 + SDL2-devel-2.0.10-VC + glm-0.9.9.6 + glew-2.1.0-win32, and include the library lib folder extracted to facilitate the project calls, dll libraries into execution folder.

       1) In the triangle when debugging, VS error, also discovered a package: glutdlls37beta, which did not appear in step tutorial

       2) debugging environment when colored, bug can not solve, suspicion and lead to inconsistent versions of the video, decided to find a detailed tutorial.

 

Be resumed according to the following tutorial:

https://learnopenglcn.github.io/01%20Getting%20started/01%20OpenGL/

 

Based glfw-3.3 + GLAD + VS2017

1) CMake generate GLFW project file (win32), VS2017 compiled directly GLFW.sln engineering (x86 + debug)

2) GLAD is an online service, select OpenGl version of the time, you can download glview tool to view your video card supports OpenGl version, I was Version4.3

 

This tutorial on github great detail, in accordance with the basic steps to do, VS2017 version I used a little out also did not affect the compilation.

       

Tutorials says GLFW replaced GLEW, I personally distinguish between SDL2 and GLFW also checked resources

 

 

 

And packet context window

OpenGL context (English: OpenGL context) create a complex process, in different operating systems also require different practices. So many game developers and user interface libraries provide functionality to automatically create OpenGL context, including SDL , Allegro , SFML, FLTK , Qt and so on. There are also some libraries are designed to create OpenGL window, which is the earliest GLUT , after freeglut replaced relatively new GLFW also be used.

  • The following packages can be used to create and manage OpenGL window, you can manage input, but almost no other function other than:

    • GLFW-- cross-platform window and a keyboard, mouse, handle processing; biased game

    • freeglut - Cross-platform window and keyboard, mouse handling; API GLUT API is a superset, but also newer than GLUT, more stable

    • GLUT - Early processing library window, is no longer maintained

  • OpenGL window supports the creation of some "multimedia library", and also supports features game-like input, voice and other procedures required:

    • Allegro 5-- cross-platform multimedia library that provides C API for game development

    • SDL - cross-platform multimedia library that provides C API

    • SFML-- cross-platform multimedia library that provides C ++ API; also provides C #, bindings Java, Haskell, Go and other languages

  • Window package

    • FLTK - Small cross-platform C ++ widget library

    • Qt - cross-platform C ++ widget library, it provides a number of OpenGL auxiliary objects, abstract away the differences between the desktop version of OpenGL and OpenGL ES

    • wxWidgets - a cross-platform C ++ widget library

 

Qt has a good package OpenGL, and IO and GUI and Qt-related process more convenient, with tutorials to learn them more easily.

 

Guess you like

Origin www.cnblogs.com/AmyBKLP/p/11875591.html