texture does not work


i was working on an OpenGL Project using glew/glfw/glm. Now i decided to use Qt instead, but i have some problems with the textures when porting the project from glew to Qt.

Here is my old glew code: https://git.rwth-aachen.de/carstenf/OpenGL/tree/master/MshViewer
and here is my new code using Qt: https://git.rwth-aachen.de/carstenf/OpenGL/tree/master/MeshViewerQt

I get this warning/error when i tried to open a msh file.

Cannot resize a texture that already has storage allocated.
To do so, destroy() the texture and then create() and setSize()

the texture is not opened, as well, but as you can see here i’m using a stock solid red texture if the file could not be open. So that texture open bug is a different problem.

Pretty sure it’s a kind of order problem

thats true if you use “glTexStorage2D(…)” to allocate memory

once you allocated the memory, you cant re-allocate later
try “glTexImage2D(…)” instead

I used as many Gl functions instead of qt as possible, so i could copy more of my old working code. But there is still nothing displayed. NOTHING!!!
Is there any way to check what data is in my buffer??
code is here: https://git.rwth-aachen.de/carstenf/OpenGL/tree/master/MeshViewerQt