build system works in mac+ubuntu
This commit is contained in:
parent
f5b63bd244
commit
cbd44c8882
|
@ -1,8 +1,16 @@
|
|||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(CppMeshRenderer)
|
||||
|
||||
|
||||
set (USE_GLAD TRUE)
|
||||
set (USE_CUDA FALSE)
|
||||
set (USE_GLFW TRUE)
|
||||
|
||||
if (MAC_PLATFORM)
|
||||
set (USE_CUDA FALSE)
|
||||
set (USE_GLFW TRUE)
|
||||
else()
|
||||
set (USE_CUDA TRUE)
|
||||
set (USE_GLFW FALSE)
|
||||
endif()
|
||||
|
||||
include_directories(glad)
|
||||
|
||||
|
|
|
@ -11,13 +11,14 @@ from gibson2.core.render.mesh_renderer.glutils.meshutil import perspective, look
|
|||
safemat2quat, xyzw2wxyz
|
||||
from transforms3d.quaternions import axangle2quat, mat2quat
|
||||
from transforms3d.euler import quat2euler, mat2euler
|
||||
from gibson2.core.render.mesh_renderer import MeshRendererContext, GLFWRendererContext
|
||||
from gibson2.core.render.mesh_renderer import MeshRendererContext
|
||||
from gibson2.core.render.mesh_renderer.get_available_devices import get_available_devices
|
||||
import gibson2.core.render.mesh_renderer as mesh_renderer
|
||||
import pybullet as p
|
||||
import gibson2
|
||||
import os
|
||||
from gibson2.core.render.mesh_renderer import tinyobjloader
|
||||
import platform
|
||||
|
||||
class VisualObject(object):
|
||||
"""
|
||||
|
@ -333,9 +334,11 @@ class MeshRenderer(object):
|
|||
self.device_idx = device_idx
|
||||
self.device_minor = device
|
||||
self.msaa = msaa
|
||||
self.r = GLFWRendererContext.GLFWRendererContext(width, height)
|
||||
|
||||
#self.r = MeshRendererContext.MeshRendererContext(width, height, device)
|
||||
if platform.system() == 'Darwin':
|
||||
from gibson2.core.render.mesh_renderer import GLFWRendererContext
|
||||
self.r = GLFWRendererContext.GLFWRendererContext(width, height)
|
||||
else:
|
||||
self.r = MeshRendererContext.MeshRendererContext(width, height, device)
|
||||
self.r.init()
|
||||
|
||||
#self.r.glad_init()
|
||||
|
|
7
setup.py
7
setup.py
|
@ -12,6 +12,8 @@ from distutils.version import LooseVersion
|
|||
import subprocess
|
||||
import platform
|
||||
import codecs
|
||||
import platform
|
||||
|
||||
|
||||
use_clang = False
|
||||
|
||||
|
@ -69,6 +71,11 @@ class CMakeBuild(build_ext):
|
|||
'-DCMAKE_C_COMPILER=/usr/bin/clang', '-DCMAKE_CXX_COMPILER=/usr/bin/clang++'
|
||||
]
|
||||
|
||||
if platform.system() == 'Darwin':
|
||||
cmake_args += ['-DMAC_PLATFORM=TRUE']
|
||||
else:
|
||||
cmake_args += ['-DMAC_PLATFORM=FALSE']
|
||||
|
||||
cfg = 'Debug' if self.debug else 'Release'
|
||||
build_args = ['--config', cfg]
|
||||
|
||||
|
|
Loading…
Reference in New Issue