1
Graphics / [Solved] Combining OpenGL stuff and graphics module
« on: January 03, 2019, 03:46:05 pm »
Hi,
I am trying to use both OpenGL 3.0+ drawing (for 3D) and SFML for texts and 2d stuff. Currently, I am stuck with it. It is possible to render one of them, but not both at once. I followed recommendations in the tutorial concerning mixing sfml with opengl: https://en.sfml-dev.org/tutorials/2.5/window-opengl.php#using-opengl-together-with-the-graphics-module and added push/pop calls to my code, but it still does not work.
To minimize amount of possible factors, I've created minimal example to test (attached in a zip).
Please, check out this code and tell me where I made the mistake or how can I figure it out. I will appreciate that.
My setup:
Windows 7
SFML 2.5.0 (pre-built binaries from sfml-dev.org)
Visual Studio 2017
glad OpenGL loader
ZIP file contains glad and the source code. In the source code, there are some #defines, which you can
tweak to test different cases
Check Main.cpp comments for more details. (sorry for messy code and globals, I think it is fine for testing purposes)
Thanks in advance,
MrOnlineCoder
I am trying to use both OpenGL 3.0+ drawing (for 3D) and SFML for texts and 2d stuff. Currently, I am stuck with it. It is possible to render one of them, but not both at once. I followed recommendations in the tutorial concerning mixing sfml with opengl: https://en.sfml-dev.org/tutorials/2.5/window-opengl.php#using-opengl-together-with-the-graphics-module and added push/pop calls to my code, but it still does not work.
To minimize amount of possible factors, I've created minimal example to test (attached in a zip).
Please, check out this code and tell me where I made the mistake or how can I figure it out. I will appreciate that.
My setup:
Windows 7
SFML 2.5.0 (pre-built binaries from sfml-dev.org)
Visual Studio 2017
glad OpenGL loader
ZIP file contains glad and the source code. In the source code, there are some #defines, which you can
tweak to test different cases
Check Main.cpp comments for more details. (sorry for messy code and globals, I think it is fine for testing purposes)
Thanks in advance,
MrOnlineCoder