Skip to main content
All CollectionsGetting started with MeshLibC++
How to create a first plugin using MeshLib C++ on Windows
How to create a first plugin using MeshLib C++ on Windows

In just a few minutes, you'll have a fully functional plugin, setting the stage for advanced plugin development.

Updated over a week ago

This documentation guides you through the process of creating your first MeshLib C++ plugin on Windows. Ensure that you have correctly installed MeshLib before proceeding with these steps.

To begin, open Visual Studio and navigate to the directory containing MeshLib. Within the MeshLib folder, locate the 'Source' directory and open the 'MeshLib.sln' solution file.
​

Upon opening the MeshLib solution, set the 'MRViewerApp' application as the Startup project. This ensures that when the solution is executed, the MRViewerApp launches by default.
​

Before proceeding further, it's recommended to build the MeshLib solution to verify that all dependencies are properly installed and configured. Note that this step may take approximately 5 to 10 minutes.
Once the solution is built, compile a build to confirm that it functions as expected.
​

In the MeshLib files, you'll find a preconfigured sample project located in the 'Source' directory. Open it to explore its structure and content.

Upon opening the sample project, you'll notice both project and JSON files. The items and UI JSON files are responsible for visualizing the plugin in the menu. You may rename these files if needed. If you rename the project, ensure to update the project name in the UI JSON file as well.


Next, navigate to the 'Hello World' plugin project and briefly review its content. The plugin includes minimal parameters such as the name, dialog box parameters, and a create function. A more detailed explanation of these parameters will be provided in our upcoming tutorial, 'Writing Advanced Plugins using the MeshLib SDK.

If you intend to rename the plugin, ensure to update the name in the corresponding JSON files as well.
​

Now, proceed to build the project to observe its functionality in action.


Excellent! The project has been successfully built and launched, with the plugin functioning as expected.

Congratulations! You've created your first 'Hello World' plugin.

In our next tutorial, 'Writing Advanced Plugins using the MeshLib SDK,' we'll delve deeper into plugin development.

Stay tuned for more insightful tutorials!

Did this answer your question?