Starting OpenGL

Hello all,

I've some good knowledge on C++ console coding and am reading Chapter 5 of the book C++-GUI-Programming-with-Qt-4-2nd Edition. For a reason I'd like to be familiar with OpenGL.
Using the address below:
http://www.opengl-tutorial.org/beginners-tutorials/tutorial-1-opening-a-window/

I went for learning it. I downloaded a portable type of cmake-3.9.3-win64-x64 and ran the executable file of it and using the tutorial built the solution using VS 2017 win x64 successfully.
In the tutorial, it says: "A black window should appear".
But when I run playground.exe, two windows appear: one console black window and one dark blue larger window with the title of Playground. And the same outcome when running the project using VS.
I have some questions:

1- Is what I've done until now OK?
2- Is it right if I start learning OpenGL with the knowledge I have for now?
3- Is that tutorial a good resource for starting learning OpenGL from the basic for the first time, or should I choose a book instead?

Tanks you so much.
Last edited on
I guess you created a console application so the black window is the normal console and the blue window is the OpenGL window.
Is there a reason why you don't use OpenGL together with Qt ?
http://doc.qt.io/qt-5/examples-widgets-opengl.html
Is there a reason why you don't use OpenGL together with Qt ?
It's my real goal. But I need to be more familiar with the road I walk through please.

1- What's the difference between using OpenGL with Qt and OpenGL independently (without Qt)?
2- What knowledge do I need to start OpenGL with Qt? I've studied only four chapters of the book above, but I like OpenGL. Does this little knowledge of Qt suffice to jump to OpenGL?
3- Except for Qt Docs, is there any other tut/book explaining OpenGL with Qt?
Last edited on
1) qt lets you draw in a window. Without that, you are looking to run either a full-screen program or you may just be drawing directly on the screen over everything else (think: screen savers). It depends on how you set up your program. Your program setup is not quite right somewhere, that is why you get both a gl window and the console window.

2) qt is fairly simple. You could take a side-bar and learn enough QT to make a window and do a little with it, or you can probably find a skeleton program that draws like a square or rotating cube or something and just start hacking on that.

3) Not sure. I really disliked QT (it isn't wysiwyg or it wasn't when I tried to use it). I learned in a fullscreen console setup, and later put gl windows into MFC window frames.
Hello, im new here on this Forum.
If you'r looking to jump into Game Programming I would advice you to check out some Game Engines instead of starting something from scratch.
You can find many Engines for Free and also rly easy to use , for 2D also 3D.

But if its just GUI you'r looking for. Than I suggest you to stay with QT.

Regards,
Topic archived. No new replies allowed.