当前位置:网站首页>Compiling Draco library on Windows platform

Compiling Draco library on Windows platform

2022-06-12 11:41:00 Jioho_

window Platform compilation draco library

The previous article talked about three.js Use VR effect Front end use three.js load Obj( 3D model file )

Also attached linux compile draco The process of . Also provided window Under the platform .exe file

However, a problem encountered recently is , The compiled code is old ,draco Also updating iterations . So I'll make it up today window Platform compilation draco library

Environmental preparation

cmake

Download link :cmake

  • cmake Find the latest version of x64 Version download ( There should be few now 32 A computer , If it is 32 Just download the one below )

Pay attention to this step during installation :

Check to add to the environment variable , This allows you to use... Anywhere on the command line cmake . Otherwise it will be reported 'cmake' Not an internal or external command , It's not a runnable program Or batch files . If other software involves this environment , It will also have an impact

Visual Studio

Download link :Visual Studio

  • Visual Studio

download 2019 The version of can change the installation location of the software package

After downloading , On the boot page

Use C++ The development of desktop resources is also on the hook ( The size is about 4G)

Similarly, the installation directory follows , Remember to change the installation directory , Or pretend C It's gone .

Tools > Get tools and functions

Tell me about the experience of stepping on a pit , I didn't know it the first time , download cmake Post configuration environment
Has been an error error in configutation process, project file may be invalid
All the information I'm looking for is openshell A problem or something , In fact, for the software we want to compile . It's just missing C++ Environmental Science

Start compilation

Get the latest code

GitHub Of google/draco

If github I can't visit , It is also possible to use the following image

google/draco

Then create a new one in the directory build Folder , Of course, you can put this folder anywhere , Just find it yourself

CMake Use

  1. Select the compiled files and directories

  1. Click on Configure To configure

Click on Finish It's time to start

If the configuration here is wrong . Return to the main interface and select File > Delete Cache Clear the configuration cache , Then you can choose again .

There will also be errors

This situation , Find the corresponding build In the catalog CMakeOutput.log file , Look at the error message

But my situation is special , I click configure After that, it became very popular , But I turned off the software , Reopen , Click again on the “Generate” It's normal !!
My computer is not installed python Environmental Science

If you know why, I hope you will give me some advice

  1. find cmake Compiled file

build Find him under the folder . use VS Open this project ( Usually, you can right-click on the VS Open the )

stay VS The right side of the , find All_BUILD Right click > " Rebuild the solution "/" To regenerate the "

Wait for the regeneration to succeed

  1. Find the last thing we want .exe file

stay build Under the table of contents , Will regenerate a debug Folder . It's ours inside .exe Files and dependent files . Just put this debug The contents of the folder are completely copied away , You can use it .

For example CMD Enter the corresponding directory in , hold testdata/360.obj Put it in and exe Statistical catalog , perform :

./draco_encoder.exe -i testdata/360.obj -o testdata/360.obj.drc

link :

VR effect Front end use three.js load Obj,drc file ( 3D model file )

CSDN VR effect Front end use three.js load Obj,drc file ( 3D model file )

原网站

版权声明
本文为[Jioho_]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203010522466701.html