I hope you’re doing well.
I don’t really know wether this is question related to OpenGL or I should post it on a Qt forum but I suspect that it has something to do with some OpenGL transformations.
So in my paintGL() function, I declared modelview matrix as a local variable, applied some transformation using lookAt function, translate and rotate.
But while working on my application, I needed to declare the modelview matrix as a member variable; as an attribute of the class MainWidget. [ it is no longer a local variable in paintGL() function]
I didn’t change anything in my paintGL() function and compiled the app.
I expected to see the cube in my scene with its coordinate system; however All I got was an empty black scene; it seems like the cube has disappeared.
I’m so confused and I’m clueless about how to deal with this because I don’t really know if it’s an OpenGL problem or a Qt.
I really would appreciate it if someone can help me or guide me or tell me what I should do.