Refactor simulate to split UI from application

Fix name of glew library

Move simulate to new directory and refactor to use C++ conventions

Wrap simulate in mujoco namespace

fix namespaces, convert struct to class, use std::lock_guard

use GetMutex to better handle destruction ordering

rename mjSimulate to Simulate

nit: space before public and typo

move startup print

use nullptr instead of NULL

use GetInstance() to get simulate object

convert init to default constructor
This commit is contained in:
Levi Burner
2022-07-08 15:58:57 -04:00
parent ea956dfe34
commit 65d5ade426
12 changed files with 2386 additions and 2195 deletions
+12
View File
@@ -0,0 +1,12 @@
# This Makefile assumes that you have GLFW libraries and headers installed on,
# which is commonly available through your distro's package manager.
# On Debian and Ubuntu, GLFW can be installed via `apt install libglfw3-dev`.
COMMON=-O2 -I../include -L../lib -std=c++11 -pthread -Wl,-rpath,'$$ORIGIN'/../lib
all:
$(CC) -c -O2 -fPIC -I../include uitools.c
$(CXX) -c -O2 -fPIC -I../include simulate.cc
$(CXX) -shared -o libmjsimulate.so simulate.o uitools.o
mv libmjsimulate.so ../lib/libmjsimulate.so
$(CXX) $(COMMON) main.cc -lmjsimulate -lmujoco -lGL -lglfw -o ../bin/simulate