Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the compilation and debugging of LearnOpenGL source code on MAC

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces how the LearnOpenGL source code compiles and debugs on MAC. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

To learn OpenGL, I'm sure many people have seen this website:

Https://learnopengl.com/

Https://learnopengl.com/

This is its original English website, and later it has been translated into different languages. The corresponding Chinese version is:

Https://learnopengl-cn.github.io/

These two websites are very helpful for learning OpenGL. They can be used not only as introductory materials, but also as reference books for subsequent leak checking and filling.

And its content is very comprehensive, in addition to the basic knowledge of OpenGL, coordinate system, texture, Shader, model loading, etc., as well as advanced lighting, PBR and other rendering skills, which will be used in the development of the rendering engine, and will continue to be shared with you later.

This article mainly explains how to run the sample code in the LearnOpenGL article, compile and debug it on XCode, and the results are as follows:

The content of a chapter on the website corresponds to the specific code of a small item of the XCode project. We can choose the chapter code to run and see the final effect in Mac.

In addition, we can also modify the relevant code on XCode, adjust some parameters, and verify our ideas and experimental results.

This is very important, for beginners, it is to keep trial and error and grow up in failure.

Before starting the code explanation of the LearnOpenGL website, I'd like to introduce his owner.

I have to say, this is a big guy. Anyone who is interested can go to Follow.

His home page is:

Https://joeydevries.com

From the home page, we can see that the boss has deep attainments in graphics and game development, and has done a lot of interesting things.

The implementation of a simple rendering engine, using C++ development, support a lot of features, can be seen on the LearnOpenGL website.

Https://github.com/JoeyDeVries/Cell

This can be regarded as a big assignment to consolidate and improve after learning OpenGL.

In addition, we have also made a teaching website for Vulkan, which is still worth looking forward to, although it has not been completed yet.

Https://learnvulkan.com/

Of course, you can also check my website, which may be of some help to you.

Https://glumes.com/

Let's get back to the compilation part of the code.

The sample code address of the LearnOpenGL website is as follows, clone this project to your computer.

Https://github.com/JoeyDeVries/LearnOpenGL

There are already instructions on how to compile on the MAC platform on the README.md of this project.

Brew install cmake assimp glm glfw

Mkdir build

Cd build

Cmake.. /.

Make-J8

But this compilation result is not what we want, because it compiles binary executable files.

Although we can run these executables through. / xxx, we can't compile them all every time we change the code.

The ideal way is to compile and run through IDE (integrated development environment), and modify the code on IDE to see the results.

XCode plays the role of IDE here.

Here is the new compiled code:

Brew install cmake assimp glm glfw

Mkdir build

Cd build

Cmake-G "Xcode"..

What has changed is the last line, which generates the XCode project in the build directory.

Double-click LearnOpenGL.xcodeproj to open the entire project.

On the LearnOpenGL source code on the MAC compilation and debugging is how to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report