Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Running Panda3D in Qt Creator IDE on Windows 10

Running Panda3D in Qt Creator IDE on Windows 10

8Observer8
8Observer8
My Instructions for beginners · · 1 min read
5,461 0

Install:

1 – Panda3D-SDK-1.10.7 x86: https://www.panda3d.org/download/sdk-1-10-7/​​​

2 – Qt 5.15.1 for MSVC 2019 32-bit: https://www.qt.io/download-open-source​​​

image


3 – MSVC v142 - VS 2019 C++ x64/x86 build tools. Use Visual Studio Installer: https://visualstudio.microsoft.com/downloads/​

image

4 – Windows Software Development Kit - Windows 10.0.19041.1 from here: https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk​

Window 10 <span class=C++" src=https://discourse.panda3d.org/uploads/default/original/2X/a/a96611dc2635756044255e6dc0f5d041813c3d79.png>

Add the “C:\Panda3D-1.10.7\bin” path to the Path variable. Create an empty project in Qt Creator IDE:

image

Select “Desktop Qt 5.15.1 MSVC2019 32 bit”:

image

Add these settings to the “.pro” file:

INCLUDEPATH += "C:\Panda3D-1.10.7\include"
LIBS += -L"C:\Panda3D-1.10.7\lib"
LIBS += -llibp3framework -llibpanda -llibpandaexpress -llibp3dtool -llibp3dtoolconfig -llibp3direct

Create the "main.cpp" file. Copy the first example from the manual: Creating a New Panda3D Application

main.cpp

#include "pandaFramework.h"
#include "pandaSystem.h"

int main(int argc, char *argv[]) {
  // Open a new window framework
  PandaFramework framework;
  framework.open_framework(argc, argv);

  // Set the window title and open the window
  framework.set_window_title("My Panda3D Window");
  WindowFramework *window = framework.open_window();

  // Here is room for your own code

  // Do the main loop, equal to run() in python
  framework.main_loop();
  framework.close_framework();
  return (0);
}

Switch Qt Creator to “Release”:

image

Run the project.

Discussion

Loading comments...