Commit Graph

19 Commits

Author SHA1 Message Date
erwincoumans
f5cdd6e015
Merge branch 'master' into master 2020-07-24 18:10:40 -07:00
Erwin Coumans
1e8f39b492 improve premake4 build in case X11 headers are missing
improve video_sync_mp4.py example
allow to create a heightfield from file or programmatically in C++ robotics api. Example:

{
		b3RobotSimulatorCreateCollisionShapeArgs shapeArgs;
		shapeArgs.m_shapeType = GEOM_HEIGHTFIELD;
		bool useFile = true;
		if (useFile)
		{
			shapeArgs.m_fileName = "D:/dev/bullet3/data/heightmaps/gimp_overlay_out.png";
			shapeArgs.m_meshScale.setValue(.05, .05, 1);
		}
		else
		{
			shapeArgs.m_numHeightfieldColumns = 256;
			shapeArgs.m_numHeightfieldRows = 256;
			shapeArgs.m_meshScale.setValue(.05, .05, 1);
			shapeArgs.m_heightfieldData.resize(shapeArgs.m_numHeightfieldRows * shapeArgs.m_numHeightfieldColumns);
			double heightPerturbationRange = 0.05;
			for (int j = 0; j<int(shapeArgs.m_numHeightfieldColumns / 2); j++)
			{
				for (int i = 0; i < (int(shapeArgs.m_numHeightfieldRows / 2)); i++)
				{
					double height = ((double)rand() / (RAND_MAX)) * heightPerturbationRange;
					shapeArgs.m_heightfieldData[2 * i + 2 * j * shapeArgs.m_numHeightfieldRows] = height;
					shapeArgs.m_heightfieldData[2 * i + 1 + 2 * j * shapeArgs.m_numHeightfieldRows] = height;
					shapeArgs.m_heightfieldData[2 * i + (2 * j + 1) * shapeArgs.m_numHeightfieldRows] = height;
					shapeArgs.m_heightfieldData[2 * i + 1 + (2 * j + 1) * shapeArgs.m_numHeightfieldRows] = height;
				}
			}
		}
		int shape = sim->createCollisionShape(shapeArgs.m_shapeType, shapeArgs);
		b3RobotSimulatorCreateMultiBodyArgs bodyArgs;
		bodyArgs.m_baseCollisionShapeIndex = shape;
		int groundId = sim->createMultiBody(bodyArgs);
		int texId = sim->loadTexture(shapeArgs.m_fileName);
		b3RobotSimulatorChangeVisualShapeArgs args;
		args.m_objectUniqueId = groundId;
		args.m_linkIndex = -1;
		args.m_textureUniqueId = texId;
		sim->changeVisualShape(args);
	}
2020-07-24 18:09:13 -07:00
root
6af885aa12 fix premake4 script when X11 is missing 2020-07-18 07:40:40 -07:00
a
3d499c8a7a pybullet: added EGL render device and window_backend option.
EGL review.
EGL dynamic loading, windowType to int
moved to glad2
Require GL 3.3 as GLInstancingRenderer.cpp uses glVertexAttribDivisor
glad2 update with dynamic X11 added
removed old file
build fix
fix mac/win
EGL w/o c++11, off by default
fix premake
fixup: premake fix 2
2018-08-30 13:24:25 +02:00
Erwin Coumans
05b02d6b3e fix glx include 2018-02-22 09:08:10 -08:00
Erwin Coumans
dacafda88a use glad instead of glew in mac build and pybullet setup.py 2018-02-20 20:09:12 -08:00
Erwin Coumans
b0984de046 preparation to replace glew by glad 2018-02-20 19:44:02 -08:00
Erwin Coumans
7d72f23711 premake: disable linking system OpenGL and X11 by default,
use dlopen to dynamically load GL/X11
2016-03-24 21:15:49 -07:00
erwincoumans
794c8ec064 add BspDemo.bsp data file
add sphere2.urdf
move btSpatialAlgebra into LinearMath
remove some warnings, introduce BT_ZERO, BT_ONE, BT_HALF as defines for 0.f/0., 1.f/1., 0.5f/0.5 respectively
2015-04-16 10:17:35 -07:00
Erwin Coumans
0125324bd6 consolidate files into btgui/OpenGLWindow (from FontFiles/OpenGLTrueTypeFont)
consolidate stringify_linux/_osx into stringify.sh
2014-09-03 09:52:31 -07:00
Erwin Coumans
954d488756 cmake+premake disable OpenGL 3 demos on Mac OSX versions below 10.9
See also http://www.bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=10073
Move ConstraintPhysicsSetup to Demos3/bullet3/ConstraintDemo
2014-08-22 14:41:21 -07:00
Erwin Coumans
7b28e86c7b add improved btGeneric6DofSpring2Constraint, thanks to Puhr Gabor and Tamas Umenhoffer!
improved the new demo testbed (work-in-progress)
add basic Lua demo, import URDF test, STL import, obj import
2014-08-20 16:28:16 -07:00
Erwin Coumans
d93b27f16c premake4: add option to force dynamic loading of OpenGL and X11
--force_dlopen_opengl and --force_dlopen_x11
2014-08-18 22:19:34 -07:00
Erwin Coumans
bf1bd07636 premake4 build: allow to dynamically load X11 if X11 system headers/library is missing
premake4 build: allow to dynamically load OpenGL/GLEW/glx if system headers are missing
2014-08-18 21:43:08 -07:00
Erwin Coumans (Google)
f89d70b895 fix Linux build 2014-07-03 22:41:07 -07:00
Erwin Coumans
dca234ec02 use included glew on Linux, only if glew is not installed in /usr/include/GL/glew.h 2014-07-01 13:01:42 -07:00
Erwin Coumans
5c1fc2e3a4 fix OpenGL detection on Linux, and re-add TTF project to premake 2014-05-14 11:03:53 -07:00
Erwin Coumans
934df75ea6 more fixes in the build, related to CMake and some error (don't delete a void* pointer!)
revert BasicDemo.cpp to original Bullet 2.82 state
2014-05-13 21:52:46 -07:00
erwincoumans
7561e6a4f9 move build to build3 to avoid naming conflict with Bullet 2.x
fix build error in BasicGpuDemo
Thanks to joen66 for the report here:
https://github.com/erwincoumans/bullet3/issues/5
2013-06-19 14:54:28 -07:00