aOpenGL은 Ubuntu에서 사용하는 OpenGL 라이브러리입니다.
aOpenGL을 사용하기 위해서는 FBXSDK 와 여러가지 외부 라이브러리들이 필요합니다.
FBX 파일들을 읽는데 필요한 라이브러리이며, Autodesk 공식 페이지에서 다운로드하시면 됩니다.
- FBXSDK 페이지에 들어갑니다:
https://www.autodesk.com/developer-network/platform-technologies/fbx-sdk-2020-2-1
- FBX SDK Linux 버전을 다운로드합니다.
- 다운로드한 폴더에 들어가서 다음 명령어들을 순서대로 실행하여 압축을 풀어줍니다.
mkdir fbxsdk_linux
tar -xvf [FBXSDK.TAR.GZ 파일] -C fbxsdk_linux
cd fbxsdk_linux
- 다음 명령어들을 순서대로 실행하여 파일들을 설치합니다.
mkdir fbxsdk
chmod ugo+x [FBXSDK 설치 파일]
./[FBXSDK 설치 파일] fbxsdk
fbxsdk
폴더 안의 파일들을aOpenGL/ext/fbxsdk
폴더 안으로 복사합니다.
FBXSDK 는 XML2 라이브러리가 필요합니다. 다음 명령어를 실행해서 설치합니다.
sudo apt-get install libxml2-dev
아래 라이브러리들은 OpenGL에 필요한 라이브러리입니다. 다음 명령어를 실행해서 설치합니다
sudo apt-get install -y libxrandr-dev;
sudo apt-get install -y libxinerama-dev;
sudo apt-get install -y libxcursor-dev;
sudo apt-get install -y libxi-dev;
sudo apt-get install -y libgl-dev;
sudo apt-get install -y libglu1-mesa-dev;
aOpenGL을 설치하기 전에, GLM과 GLFW 라이브러리를 빌드해줘야 합니다. GLM과 GLFW는 서브모듈로 ext 폴더에 있습니다.
- aOpenGL 폴더에 들어갑니다.
- 다음 명령어를 순서대로 실행합니다.
cd ./ext/glm
mkdir build
cd build
cmake ..
make -j
- aOpenGL 폴더에 들어갑니다.
- 다음 명령어를 순서대로 실행합니다.
cd ./ext/glfw
mkdir build
cd build
cmake ..
make -j
- aOpenGL 폴더에 들어갑니다.
- 다음 명령어를 순서대로 실행합니다.
cd ./ext/freetype
mkdir build
cd build
cmake -D BUILD_SHARED_LIBS=true -D CMAKE_BUILD_TYPE=Release ..
make -j
- aOpenGL 폴더에 들어갑니다.
- 다음 명령어를 실행합니다.
mkdir build
cd build
cmake ..
make -j
- aOpenGL 폴더에 들어갑니다.
- 다음 명령어를 실행합니다.
cd build
./bin/draw
더 많은 예제들은 examples 폴더에 있습니다.
F1: Wireframe Mode Off
F2: Wireframe Mode On
F5: Capture Mode On (build/capture 폴더 안에 매프레임 저장)
F6: Capture Mode Off
- Go to wiki and find a page named 'How to make your new project with aOpenGL & aLibTorch'
page: https://github.com/ltepenguin/aOpenGL/wiki/How-to-make-your-new-project-with-aOpenGL-&-aLibTorch
- Follow the instructions step by step reading the page.