texture does not work

Hi,

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: MshViewer · master · C-Fu / OpenGL · GitLab
and here is my new code using Qt: Files · master · C-Fu / OpenGL · GitLab

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
https://www.opengl.org/wiki/Texture_Storage#Immutable_storage

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: Files · master · C-Fu / OpenGL · GitLab