How-to: Build Qt project in HOOPS Visualize 3DF Linux

Build Environment

  • Linux version: Ubuntu 20.04.5 LTS (used in the process of authoring this article)
    • g++ (required compiler)
      • sudo apt-get install g++
      • sudo apt-get install build-essential
    • X11 dev
      • sudo apt-get install xorg-dev
    • OpenGL dev
      • sudo apt-get install freeglut3-dev
    • Mesa
      • sudo apt-get install mesa-common-dev
      • sudo apt-get install mesa-utils
  • Follow Install Qt 5 on Ubuntu - Qt Wiki instructions or the following
    • sudo apt-get install qt5-dev-tools
    • sudo apt-get install libqt5x11extras5-dev
    • The following were used in the process of authoring this article
      • QMake version 3.1
      • Qt Version 5.12.8
  • HOOPS Visualize 3DF 27.xx (used in the process of authoring this article)
    • Firstly, we’ll need to download two packages from the Developer Zone portal:
      • Expand the Linux dropdown section and download hoops_3df27xx_linux64.tar.gz
      • Expand the Unix-like Common dropdown section and download hoops_3df27xx_common.tar.gz
      • Merge both archives into one folder by first extracting hoops_3df27xx_common.tar.gz and then extracting hoops_3df27xx_linux64.tar.gz (it’s okay to replace existing files)
    • While we are at the Developer Zone portal, generate and save a hoops_license.h header – if you don’t already have one. Place the license header (and replace the old header) found in HOOPS_3DF_27xx/Dev_Tools/hoops_3dgs/source.

Building Qt Simple

Using Qt Creator

  1. Launch Qt Creator and open qt_simple.pro found in HOOPS_3DF_27xx/demo/qt/qt_simple.
  2. When the project first opens, just configure the project to default settings – so just click Configure Project button.
  3. We need to make a few changes to the Qt project settings:
    a. Select Projects in the side panel menu:

b. Click Details to expand dropdown section. Change build configuration to Release . Then add the variable HOOPS3DFVER=XXXX – where XXXX is the 3DF version – in the Additional arguments field:


5. Build and Run the Qt project.
6. Select desired driver for the Qt HOOPS Viewer:
image-20221004-235806

If you’re using a VM and OpenGL2 does not work, disable 3D acceleration in the VM client configuration.


Using Terminal / Command Line

If you would rather just use the Terminal to build the qt_simple application:

  1. Navigate to the HOOPS install directory (e.g. HOOPS_3DF_27xx) and type make qt_simple:
    image-20221004-171430

  2. Then navigate to HOOPS_3DF_27xx/bin/linux_x86_64 and run qt_simple with the command ./qt_simple

NOTE: For older versions of HOOPS 3DF, such as v23.xx, the application name is QSimple. Also, you will need to specify the CONFIG value to build it:
make QSimple CONFIG=release