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

<p>So what you really need is a way to load a .off file to render in legacy opengl. <a href="https://en.wikipedia.org/wiki/OFF_(file_format)" rel="nofollow noreferrer">it looks like a very simple format</a>, even simpler than .obj. So simple that IMO it is worth it for you to figure out on your own.</p>

CC BY-SA 4.0
2018-10-31T12:57:14.707Z
2018-10-31T12:57:14.707Z
ratchet freak
<p>I want to open a .off file and view the content 3d model using libQGLViewer, qt-creator.</p>

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

<pre><code>QString fileName = QFileDialog::getOpenFileName(this,tr("Open .off model"), "/home", tr("*.off"));
</code></pre>

CC BY-SA 4.0
2018-10-31T17:05:44.583Z
`tr("*.off")` - I'm pretty sure you don't want to translate the file extension to other languages.
Dan Hulme
<3d><c++>
qt - view geomview (.off ) file
n.m
# qt - view geomview (.off ) file

(Asked by: username_0 on 2018-10-31)

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"));

```

**Tags:** 3d, c++

> **Comments:**
> **username_1**: `tr("*.off")` - I'm pretty sure you don't want to translate the file extension to other languages.  

---

## 1 answers

### Answer by username_2 on 2018-10-31. Score: 1

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](https://en.wikipedia.org/wiki/OFF_(file_format)), even simpler than .obj. So simple that IMO it is worth it for you to figure out on your own.


---

