Here’s my thoughts on it:
- That sounds right. That tutorial uses GLFW for window management, and it normally opens a console window alongside your main window. It’s useful for printing out debugging info., with std::cout, std::cerr, etc…
I didn’t build the solution from the site, but I still have a solution for VS 2015 I made from that tutorial back in January, according to Windows Explorer. In my solution, “glClearColor(0.0f,0.0f,0.4f,0.0f)” was used to make the background dark blue, like you describe. Looks like the tutorial hasn’t changed since then, so I’m sure you did it correctly.
- If you’re comfortable with C++ as you say, I’d say you can try out OpenGL. The learning curve with OpenGL is more about understanding the library itself. It was designed mainly for C, and because of that, you aren’t required to understand things like C++ templates and OOP to use it. With regards to C/C++, in source files, being comfortable with function calls and pointers is good enough.
Math-wise, Silence mentioned linear algebra, geometry, and trigonometry. I’d say for linear algebra, if you’re comfortable with matrices, matrix multiplication, the dot product, and the cross product, you know a good chunk of the math already to do 3D graphics in OpenGL. Linear algebra is quite a big topic in itself, with eigenvectors and diagonalization (and proofs too). You don’t need that if you just want to map 3D points you define into OpenGL’s 2D screen coordinates. In the tutorial website you mentioned, there’s even a “Basic Tutorials -> Matrices” section if you’re new to the whole concept.
Other than that, for geometry and trigonometry, knowing the difference between degrees and radians and your trigonometric functions is good.
- That tutorial looks good. It’s up to you and your learning style. Personally, I thought that tutorial was a bit overwhelming when I first started looking into OpenGL because it didn’t explain much about the functions it used.
I prefer LearnOpenGL’s tutorials because they explain more about opengl concepts and functions. Even then, I was just super happy getting 3D graphics working and getting camera and lighting code to work. But I liked how the author of those tutorials added background information on graphics concepts like stencil buffering. Although I got code to work in that tutorial, I don’t understand it fully right now, but I’ll keep it in note to look back at in the future.
(As a side note, if you do decide to look into LearnOpenGL’s tutorials, make sure to check out the Code Repository link on that site. It already has complete source code available for you, if you just want to get samples working for the first time. I never saw that before, and as I hinted above, I put a lot of effort focuing on pasting/removing functions to get code examples to work. I never knew that repository was there. A little silly, I admit haha, so I mention it here just so you know about it now.)
Nonetheless, I respect both tutorials because the authors put the effort in to provide complete code examples, and they also both explained how to build them. It takes a lot of work to make content that like that.
As Silence mentioned, there was a recent thread asking about learning OpenGL called “Learning OpenGl”. People mentioned links, could be useful for you.
With your last message, you don’t really use OpenGL “independently”. OpenGL is solely a library for drawing graphics. In order to display its contents in a window, you need to first use a window management API that allows you to create/describe how you want to display OpenGL in that window. It’s known as creating an OpenGL context for a given window.
With Qt, I’m guessing you can put a child window within your main application window and set it so that all your OpenGL drawings render to that window. And you can also add buttons and scroll bars for example to your main window that can interact with that OpenGL child window. I think that’s pretty cool as an API. It’s nice you’re looking into it. It’s been a while since I ever tried it. It was too much for me then. I was new to C++ at the time. Qt Creator and the addition of signals and slots to the standard C++ language was too much for me.
Anyways, you can also consider GLFW to be a window management API. It’s used in the tutorial you linked to create the main window with the dark blue background. Unlike Qt, you can’t add scroll bars and buttons. GLFW is more for game development, not for developing GUI software to help you make games. But I still like it as a nice, lightweight, low-level API. It’s a good choice in my opinion if you’re learning OpenGL for the first time and don’t want to worry about window creation. Overall, both GLFW and Qt are powerful in the sense that they’re both cross-platform.
So my answer to your question about using OpenGL is that you can’t consider using OpenGL independently. You need to consider the API you use to create the window and OpenGL context that will display your OpenGL drawings. Qt and GLFW are examples of cross-platform, window management APIs that allow you to do that.
My last note is that on Windows, if you really want to go as low-level as possible with regards to a window management API, you use Windows API. As noted by its name, it’s only for Windows, but you have full control over window creation in your Windows OS for creating something like an OpenGL context. Cross-platform APIs like Qt and GLFW abstract the window creation process necessary with the Windows API and also the OpenGL context creation process. If you’re new to OpenGL, I’d say stick with Qt and GLFW for now, and if you want low-level control, just look up that.