I want to open a .off file and view the content 3d model using libQGLViewer, qt-creator.

I don't know how to display the 3d model after opening its .off file.

QString fileName = QFileDialog::getOpenFileName(this,tr("Open .off model"), "/home", tr("*.off"));
  • tr("*.off") - I'm pretty sure you don't want to translate the file extension to other languages. – Dan Hulme Oct 31 at 17:05

From a quick gander through the examples it looks like QGLViewer is a thin wrapper around a opengl window using the legacy api.

So what you really need is a way to load a .off file to render in legacy opengl. it looks like a very simple format, even simpler than .obj. So simple that IMO it is worth it for you to figure out on your own.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.