lfybbk10 Posted September 13, 2023 Share Posted September 13, 2023 Hello, a fairly simple question, but I couldn't find the answer anywhere. The documentation states: "To compile a library with double precision support, specify the command line parameter double=1." The question is, where to specify this parameter when compiling in Visual Studio? Link to comment
silent Posted September 14, 2023 Share Posted September 14, 2023 double=1 refers only for the engine rebuilding from source. Since we are not shipping engine sources for a long time I assume that you are not trying to do it, right? If you want to use double precision in your project, simply enable double precision support in the SDK Browser when creating a new project: https://developer.unigine.com/en/docs/2.17/sdk/projects/?rlang=cpp#application_settings Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
lfybbk10 Posted September 14, 2023 Author Share Posted September 14, 2023 @silent I understand, but then how to compile a plugin so that it works on a project with double precision? Link to comment
silent Posted September 14, 2023 Share Posted September 14, 2023 In that case you can use UNIGINE_DOUBLE preprocessor definition. You can take a closer look in a small sample: SDK Browser -> Samples -> C++ API -> Systems -> Plugins. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
lfybbk10 Posted September 14, 2023 Author Share Posted September 14, 2023 @silent If I understood everything correctly, then this is configured here in Visual Studio and UNIGINE_DOUBLE is set here by default, but in the editor console it still outputs to me that the plugin with float precision Link to comment
silent Posted September 14, 2023 Share Posted September 14, 2023 Are you trying to create an Editor plugin? In that case please follow this article: https://developer.unigine.com/en/docs/2.17/editor2/extensions/custom_plugin?rlang=cpp#build_ide If you have any issues attach your plugin sources (including vcxproj) and we can tell what's going on here. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
lfybbk10 Posted September 14, 2023 Author Share Posted September 14, 2023 @silentYes, I created the editor plugin using the template editor plugin when creating the project. Compiled the plugin, after running the editor in the console outputs: Editor.PluginSystem: Your plugin is ignored by UnigineEditor due to incompatible version/precision. UnigineEditor v.2.16.1.0 (double precision) ScenarioCreator_x64.dll plugin v.2.16.1.0 (float precision) Attached the plugin files ScenarioCreator.h ScenarioCreator.json ScenarioCreator.sln ScenarioCreator.vcxproj ScenarioCreator.cpp moc_ScenarioCreator.cpp Link to comment
victor Posted September 15, 2023 Share Posted September 15, 2023 Hi, You've helped us to find a bug in our SDK for the case when you create an Editor plugin for Visual Studio with double precision. I corrected and attached your vcxproj file with the fix. Eventually it was necessary to add UNIGINE_DOUBLE for Qt moc compiler too. Thanks a lot. ScenarioCreator.vcxproj 1 Link to comment
lfybbk10 Posted September 15, 2023 Author Share Posted September 15, 2023 @victor It works, thanks! Link to comment
Recommended Posts