![]() ![]() Exactly for those reasons there is a tool called CMake.ĬMake is a tool that can generate project/solution files of the user's choice (e.g. So people then have to setup their own project/solution with the given. The problem with providing source code to the open world however is that not everyone uses the same IDE or build system for developing their application, which means the project/solution files provided may not be compatible with other people's setup. The resulting library from compilation.Ĭompiling the library from the source code guarantees that the resulting library is perfectly tailored for your CPU/OS, a luxury pre-compiled binaries don't always provide (sometimes, pre-compiled binaries are not available for your system).Once you've downloaded the source package, extract it and open its content. We'll be building all libraries as 64-bit binaries so make sure to get the 64-bit binaries if you're using their pre-compiled binaries. This is to give you a feel for the process of compiling open-source libraries yourself as not every library will have pre-compiled binaries available. GLFW already has pre-compiled binaries and header files for Visual Studio 2012 up to 2019, but for completeness' sake we will compile GLFW ourselves from the source code. GLFW can be obtained from their webpage's download page. If you're not using Visual Studio (or an older version) don't worry, the process will be similar on most other IDEs. We'll use Microsoft Visual Studio 2019 IDE as of this writing (note that the process is the same on the more recent visual studio versions). This chapter takes a step-by-step approach in retrieving, building and linking the GLFW library. The focus of this and the next chapter is to get GLFW up and running, making sure it properly creates an OpenGL context and that it displays a simple window for us to mess around in. It allows us to create an OpenGL context, define window parameters, and handle user input, which is plenty enough for our purposes. GLFW gives us the bare necessities required for rendering goodies to the screen. GLFW is a library, written in C, specifically targeted at OpenGL. Feel free to use any of the other libraries, the setup for most is similar to GLFW's setup. Some of the more popular libraries are GLUT, SDL, SFML and GLFW. Those libraries save us all the operation-system specific work and give us a window and an OpenGL context to render in. Luckily, there are quite a few libraries out there that provide the functionality we seek, some specifically aimed at OpenGL. This means we have to create a window, define a context, and handle user input all by ourselves. However, those operations are specific per operating system and OpenGL purposefully tries to abstract itself from these operations. The first thing we need to do before we start creating stunning graphics is to create an OpenGL context and an application window to draw in. Creating a window Getting-started/Creating-a-window ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |