rdb
bea15cd39a
pgraph: fix crash when cull_callback modifies node in some way
2018-10-17 17:29:30 +02:00
rdb
9da335ac42
Merge branch 'master' into deploy-ng
2018-10-16 23:02:19 +02:00
rdb
90cc8fe385
Fix building with SIMPLE_THREADS=1
2018-10-16 22:15:36 +02:00
rdb
88b0f3327d
Warning fixes and cleanups when building with SIMPLE_THREADS
2018-10-16 21:32:42 +02:00
rdb
0c9c698d13
pipeline: make BlockerSimple constexpr (needed by MutexSimpleImpl)
2018-10-16 21:18:02 +02:00
rdb
fbf939141b
gobj: fix typo causing crash when preparing shader
2018-10-16 21:13:27 +02:00
rdb
b569875bf9
windisplay: fix window size changing when switching undecorated
2018-10-16 16:31:46 +02:00
rdb
bfeb5060b8
gobj: don't create pointless future in TextureReloadRequest
2018-10-16 15:23:52 +02:00
rdb
75826c9a51
glgsg: fix error with multisampled float depth buffer
...
Fixes #416
2018-10-16 15:20:45 +02:00
rdb
dd50d7d206
Merge branch 'master' into deploy-ng
2018-10-16 12:37:32 +02:00
rdb
bcc2e3e404
gobj: add Geom::get_animated_vertex_data() short-hand
...
This is a method for getting the animated vertex data that will keep working even if GeomVertexData::animate_vertices() gets deprecated due to #421 being fixed.
2018-10-15 22:13:21 +02:00
rdb
0131d1013b
gobj: fix assert when enabling hw anim if blend has 5+ transforms
...
Instead, we reduce the TransformBlend down to the 4 most-weighted joints.
2018-10-15 22:07:32 +02:00
rdb
6e370ebbdd
gobj: speed up GeomVertexData::get_num_rows() considerably
2018-10-15 22:06:04 +02:00
rdb
c28045990c
Merge branch 'master' into deploy-ng
2018-10-15 15:42:48 +02:00
rdb
70f4c1cd4e
glgsg: change missing Cg attrib error message to debug
...
This can occur if a variable is optimized out by the GLSL compiler but not by the Cg compiler. So it should not be reported as an error.
Fixes #417
2018-10-15 14:09:39 +02:00
Sam Edwards
2d80d6d063
general: Add missing includes and remove deprecated type
...
Credit for missing includes to @treamology in Git commit
16cfac4829
CGTableCount removed; modern macOS seems to call this
a uint32_t instead. I can find no reference to CGTableCount
in any documentation, and the (very old) source code I dig
up just typedefs it anyway.
2018-10-14 15:50:06 -06:00
Sam Edwards
602ea6ebf4
general: Fix a couple more compiler warnings
...
- express: Fix a warning when compiling for debug
- dtoolutil: Give TextEncoder a virtual destructor
2018-10-13 16:14:34 -06:00
Sam Edwards
84ed19e8a7
display: Add two missing includes
...
(lightAttrib.h and materialAttrib.h)
2018-10-12 21:49:49 -06:00
Sam Edwards
6f62396373
general: Resolve a few compiler warnings
...
- display: GraphicsWindowProc should have a virtual destructor,
as it's meant to be subclassed.
- express: set_matrix_view helper should always fail an assert
when 'size' is wrong, even on release builds.
- express: Fix filename capitalization on some #includes.
They're normally Windows-only, where case doesn't
matter, but it's better to be consistent.
- gobj: Fix typo.
- particlesystem: Remove BaseParticle::_last_position.
Last position is tracked by PhysicsObject now.
- windisplay: Heed warnings about casting bool to (PVOID).
Also, per MSDN docs, SPI_SETMOUSETRAILS uses the
uiParam argument and ignores pvParam, so pass the
_saved_mouse_trails value in that way.
2018-10-12 15:37:40 -06:00
rdb
7bd8cbdeb6
windisplay: allow changing undecorated/fixed_size after window open
...
Fixes #405
2018-10-08 23:20:04 +02:00
rdb
9061fd9416
dtoolutil: fix TextEncoder methods for Python 3
...
The no-arguments get_text() and set_text() will now return Unicode strings in Python 3, but passing in an encoding will make them return/take bytes objects.
In Python 2, they all take regular strings, but Unicode is also accepted by the no-argument get_text() and set_text().
In the future we probably want to remove most of this interface for Python users, to whom all this is unnecessary since it duplicates functionality already in the standard library.
2018-10-08 22:14:51 +02:00
rdb
96860b88e0
dxgsg9: fix problems with window without depth buffer
2018-10-08 22:11:55 +02:00
rdb
93a3e7e699
Changes to make ColorAttrib behavior more consistent:
...
- T_off now actually properly disables vertex colours
- T_vertex is now the default, to preserve the previous behaviour
- ShaderGenerator behavior is now the same as in the FFP
- tests are updated to verify new behavior
- tests now properly use vertex colours, previously they accidentally only used flat colors
- With color-scale-via-lighting off and no color scale, color is no longer munged
- p3d_Color in GLSL shaders is now properly set to white instead of black with T_off mode
- In DX9 shaders will now sample white color for absent or disabled vertex color
Fixes #401
Also see #371
2018-10-08 22:09:22 +02:00
rdb
ada3fa5513
Compile fixes on input-overhaul branch
2018-10-08 01:44:17 +02:00
rdb
14042faa3d
Merge branch 'master' into input-overhaul
2018-10-08 01:25:33 +02:00
rdb
80951b3268
task: provide more properties on AsyncTask
2018-10-07 23:02:50 +02:00
rdb
51414466da
display: ignore material if no lights are applied
...
This fixes materials suddenly showing up when a color scale is applied and color-scale-via-lighting is set.
Fixes #404
2018-10-07 22:52:49 +02:00
rdb
e1af4abf11
glgsg: fix sRGB for FBOs created from non-sRGB host window
...
In this case _current_properties in begin_frame() will not have srgb_color set, as the current props are set by the host window
2018-10-07 21:42:23 +02:00
rdb
b0c9000000
display: fix assert when app exits before window fully opens
...
Possibly addressing #403
2018-10-07 21:41:02 +02:00
rdb
9618cd2193
device: ensure libputil is initialized before scanning devices
2018-10-07 21:06:24 +02:00
rdb
4b77812b35
device: fix inverted flight stick throttle on Linux
2018-10-07 20:49:13 +02:00
rdb
f518b9aaf1
device: fixes to sporadic device class detection on Linux
2018-10-07 20:48:39 +02:00
Sam Edwards
51497da8fb
movies: Fix missing include
2018-10-07 01:36:43 -06:00
Sam Edwards
87d1048f79
mathutil: mersenne.h parameters should not be an enum
...
This makes no sense as an enum; they're constants, so
they should be static const.
2018-09-30 16:05:39 -06:00
rdb
85752b06f5
device: delete InputDevice copy ctor / assign operator
2018-09-28 17:32:38 +02:00
rdb
9b85a28861
putil: rename MouseData to PointerData to be more inclusive
2018-09-28 17:18:38 +02:00
rdb
3ffe11485d
Merge branch 'master' into input-overhaul
2018-09-28 15:12:49 +02:00
rdb
183d66a5c2
pipeline: fix compiler warning due to PAUSE symbol redefined
2018-09-28 14:20:47 +02:00
rdb
fac82e6dca
pgraph: fix precision issues with Color(Scale)Attrib quantization
2018-09-28 13:19:36 +02:00
rdb
5ae38a8a92
Fix crash loading from search path
...
Possible fix for #395
2018-09-27 22:16:56 +02:00
rdb
a099c85245
ShaderGenerator: fix broken handling of CO_undefined alpha operand
...
Fixes #394
2018-09-25 21:19:30 +02:00
rdb
cd033c27e8
grutil: add thread safety to ShaderTerrainMesh
2018-09-25 21:00:08 +02:00
rdb
1e084e0b2b
text: add thread safety to TextNode
...
This does not 100% cover all the base class TextProperties, however, so you still need to be careful not to access those from two threads at once.
2018-09-25 11:35:16 +02:00
rdb
5457d76b94
text: slight perf improvement for TextNode card/frame generation
2018-09-25 11:08:22 +02:00
rdb
3ac50a2347
movies: fix crash on simultaneous threaded audio/video load
2018-09-23 14:22:41 +02:00
Sam Edwards
b64e850539
egg(2pg): Fix missing EXPCL_PANDA_EGG(2PG)
2018-09-21 18:26:13 -06:00
Younguk Kim
ba9ea8ea27
chan: add missing export macro
2018-09-21 19:49:21 -04:00
rdb
338b428e65
Merge branch 'master' into deploy-ng
2018-09-17 17:37:07 +02:00
rdb
8edc019307
device: overhaul InputDevice API:
...
- Rename "controls" terminology for analog inputs to "axes"
- Change some naming of accessors
- Unexpose methods where they are available as properties
- Add serial_number field
- Put battery levels under a "battery" field
2018-09-16 20:22:22 +02:00
rdb
8d8c5a546d
input: rename "action_x" button handles to "face_x"
2018-09-16 14:50:00 +02:00
rdb
e30b597926
Merge branch 'master' into input-overhaul
2018-09-16 12:28:22 +02:00
rdb
3417b9df09
egg: work around compiler bug in Visual Studio 2017
...
Fixes #379
2018-09-13 21:14:04 +02:00
rdb
ecb2b6f546
movies: forbid automatic coercion from string to MovieAudio
...
This was causing issues in the unit test when calling audiomgr.get_sound() with string.
2018-09-13 21:14:05 +02:00
rdb
47496068d3
Show materials with only base color applied properly
2018-09-09 20:56:37 +02:00
rdb
b183e99692
gobj: fix bug printing Material base color
2018-09-09 20:23:48 +02:00
rdb
11ecd3af87
putil: make ButtonHandle::none() constexpr
2018-09-04 12:58:48 +02:00
rdb
809f9b04f6
Fix problems with spinlock mutex/cvar implementation
...
This reimplements the spinlock on top of std::atomic_flag, which is guaranteed to be lockless. It also inserts the PAUSE (REP NOP) instruction which is strongly recommended to be placed in busy-wait loops by Intel.
This also includes a recursive spinlock implementation.
The spinlock implementation is disabled by default, but can be enabled by adding the --override MUTEX_SPINLOCK=1 flag to makepanda.
2018-09-04 12:58:48 +02:00
rdb
cf4f8b35b6
pgui: fix deadlock in PGScrollFrame/PGSliderBar
2018-09-04 12:58:37 +02:00
rdb
217cecb77f
pgui: remove some unnecessary reentrant locking in PGItem
2018-09-04 12:02:13 +02:00
Sam Edwards
e13a4d6539
pstatclient: Never pass nullptr to memcpy
...
Even though the only time this happened was when the size was 0,
it's still undefined to pass memcpy a nullptr.
2018-09-03 16:10:40 -06:00
Sam Edwards
5f72e9c763
bullet: Fix misplaced INLINE getter
2018-09-02 16:04:33 -06:00
Sam Edwards
8c09477e37
bullet: Add missing includes and declarations for non-composite build
2018-09-02 16:04:25 -06:00
rdb
17bf50f1e8
audio: get_sound and uncache_sound should take Filename, not string
2018-09-02 20:55:58 +02:00
rdb
845ec7a990
cull: don't munge_points_to_quads if shader handles point size
2018-09-02 20:55:18 +02:00
rdb
b1f32e3f84
shader: reserve SL_SPIR_V ShaderLanguage value (as on vulkan branch)
2018-09-02 12:00:30 +02:00
rdb
9dec2aafb5
Fix static init ordering crashes in static build of pview
...
Fixes #381
2018-09-02 10:59:46 +02:00
rdb
3495537bf9
gobj: support clearing half-float textures
...
Fixes #374
2018-09-02 10:58:02 +02:00
rdb
c670cd45d9
gobj: handle infinity and NaN when peeking half float values
2018-09-02 10:56:20 +02:00
rdb
c4fe1ed883
gobj: slight refactor of Texture::do_get_clear_data()
2018-09-02 10:54:07 +02:00
Sam Edwards
4695557a5d
general: Don't require BUILDING_* for static builds
2018-08-31 23:54:32 -06:00
rdb
7cc100c38c
device: change ControlAxis enum to an Axis enum class
2018-08-26 21:18:29 +02:00
rdb
aae2b1e5ad
putil: fix a compiler warning
2018-08-26 21:18:11 +02:00
rdb
1d6c3f6486
Merge branch 'master' into input-overhaul
2018-08-26 19:03:21 +02:00
rdb
115f8df4d5
putil: work around GCC bug causing undefined reference in debug build
2018-08-26 14:03:44 +02:00
rdb
c9372c3699
Fix a few GCC compile warnings
2018-08-26 14:02:33 +02:00
rdb
57b66ebeaf
Merge branch 'master' into deploy-ng
2018-08-20 19:13:04 +02:00
Mitchell Stokes
f663d215d5
Remove some unused variables
2018-08-19 16:55:07 +02:00
rdb
371c34d13b
linmath: allow constructing matrix from rows
...
This also enables using mat[n] wherever an LVecBase4 is accepted, as well as Mat4(*mat).
2018-08-19 16:42:36 +02:00
rdb
b1d2111037
express: add Datagram add_blob and add_blob32, et al.
...
This is for writing Python 2/3 agnostic code for writing binary data to a datagram, and reading from it using DatagramIterator.
2018-08-19 16:01:39 +02:00
rdb
74442e41f1
express: slight Datagram constructor cleanup
2018-08-19 14:21:23 +02:00
rdb
ba345d590f
express: make Datagram.get_message() return bytes in Python 3
...
This is done using a Python extension function, which also happens to make the call more efficient as this avoids an extra copy. The C++ version still returns std::string as there is still a lot of C++ code that relies on that.
Fixes #297
2018-08-19 13:40:58 +02:00
Sam Edwards
06f7da5215
express: Fix misclassified EXPCL_PANDA_ macro
2018-08-14 21:58:11 -06:00
Sam Edwards
6105953b40
general: Add forgotten include
2018-08-14 17:23:56 -06:00
Mitchell Stokes
49c47164ff
Merge remote-tracking branch 'origin/master' into deploy-ng
2018-08-12 19:58:15 -07:00
rdb
72e593800f
gobj: don't recalculate proj mat on set_near/far with existing value
2018-08-12 22:06:13 +02:00
rdb
54ec575472
egg: add properties to EggData / EggNode
2018-08-12 22:05:25 +02:00
deflected
eb0f753a3c
x11display: fix loading cursor from compressed/encrypted stream
2018-08-08 21:54:58 +02:00
rdb
433f734d43
mathutil: BoundingPlane improvements
2018-08-08 21:54:52 +02:00
rdb
2556d006f7
glgsg: a few version check tweaks
2018-08-05 13:09:25 +02:00
rdb
8348f16665
glgsg: fix incorrect behavior if mat has either ambient or diffuse
...
This might have only been an issue in some drivers (not sure, spec is a bit vague here).
Apparently we need to call glMaterial *after* the color material setting has been disabled for it to stick.
Fixes #369
2018-08-05 12:54:32 +02:00
rdb
60468b0bec
ShaderGenerator: additional case where vtx_color isn't needed
...
See sample code in a comment in #370
2018-08-05 12:49:03 +02:00
rdb
b836a60adb
cull: remove unused variable declarations
2018-08-03 22:59:04 +02:00
rdb
929808b867
ShaderGenerator: fix regression with flat colors
2018-08-03 22:58:29 +02:00
rdb
8806dedb51
ShaderGenerator: avoid writing vtx_color input if unneeded
2018-08-03 22:24:48 +02:00
rdb
9ba2d7242e
gobj: get rid of enforce-attrib-lock, just DTRT instead
...
This setting causes asserts when modifying certain material flags after they are assigned to a node, in case a shader has been generated that uses the materials, which cannot efficiently detect whether the material has changed. However, we already sort of have a (inefficient, but effective) solution for this in TextureStage (see #178 ) that we could just apply here as well: changing the material attributes after such a shader has been generated could call GraphicsStateGuardianBase::mark_rehash_generated_shaders().
In the future, we should replace the material model with one that does not require shader regeneration for such seemingly trivial property changes.
Fixes #370
2018-08-03 21:55:06 +02:00
rdb
7e290b221b
Remove a few unused and obsolete C++ test files
2018-08-03 21:09:36 +02:00
rdb
668a093c26
gobj: try to fix some deadlocks modifying geometry while rendering
...
The correct locking order should be: the Geom's GeomVertexArrayData first, *then* the GeomPrimitive.
2018-08-03 20:45:29 +02:00
rdb
0cd69c8748
gobj: fix TexturePool ambiguity when loading tex with other settings
...
Previously, if you called load_texture a second time with different parameters (such as an alpha filename), you would still get the old texture.
2018-07-31 14:56:04 +02:00
rdb
fe1bfef5c0
express: fix a few compile errors with certain WeakPointerTo uses
...
Fixes #367
2018-07-31 14:02:58 +02:00
rdb
4e42c4c941
nativenet: fix interrogate error recognizing sockaddr types
2018-07-31 11:08:14 +02:00
Mitchell Stokes
247575df62
CoordinateSystem: Document enumerators
2018-07-30 21:26:50 -07:00
rdb
91b01e5621
collide: add tube-into-box collision test
2018-07-30 22:37:02 +02:00
rdb
243ee75e47
express: refactor WeakPointerTo::lock() a little bit
2018-07-30 22:24:55 +02:00
rdb
ad3ab3ad21
Define stable ordering for WeakPointerTo for use as map/set key
...
Currently, the WeakPointerTo comparison operators compare the raw pointers, but this is not useful as it may cause a false equality if one weak pointer in the comparison is expired and points to memory that has since been reused.
Instead, we can define a comparison based on the control block pointer, which exists since the new weak pointer implementation in 0bb81a43c9 . This is implemented in the owner_before method, matching C++11 std::weak_ptr semantics.
I would now recommend deprecating most comparison operators of WeakPointerTo or redefining them to make more sense, ie. comparing equal if they (once) referred to the same object and not if they simply point to the same memory address. This has not yet been done, though code that uses the comparison operators has been fixed in this commit.
Overloads of std::owner_less have been provided for creating a map or set with Weak(Const)PointerTo keys.
2018-07-30 17:27:09 +02:00
rdb
2d7e80a89e
express: add full range of WeakPointerTo ctors and assign ops
...
Matches PointerTo constructors/assignment operators, supporting conversion between related pointer types.
Fixes #367
2018-07-30 17:26:02 +02:00
rdb
0cb763a10a
ShaderGenerator: always use generic attr on Linux
...
48808fe269 disabled this on Linux, but I believe this was an accidental change.
2018-07-26 22:58:15 +02:00
rdb
02b32a5814
glgsg: support vertices-float64 in core profile shaders
...
Requires OpenGL 4.1 or GL_ARB_vertex_attrib_64bit extension.
2018-07-26 22:58:15 +02:00
rdb
0f4168a304
text: use 64-bit coords in TextAssembler if vertices-float64 set
2018-07-26 22:58:07 +02:00
rdb
d081b4d420
mathutil: override plane.normalize() to be meaningful for planes
...
Now it only divides by the length of the normal, rather than also adding in the square of the w component.
2018-07-26 22:08:37 +02:00
rdb
c634c455fd
framework: add zero-argument version of open_framework()
2018-07-26 22:08:37 +02:00
rdb
ecfeae8a27
shader: support double-precision vertex columns in GLSL
2018-07-26 22:07:20 +02:00
rdb
7fe72c47f3
glgsg: update copy of glext.h
2018-07-23 09:02:12 +02:00
rdb
1a6d329fde
gobj: support T_unsigned_int_24_8 in TexturePeeker
2018-07-23 08:32:58 +02:00
rdb
f45fa747d1
x11display: fix BadWindow if get_pointer called after win close
2018-07-17 23:01:44 +02:00
rdb
bbb15631c6
mathutil: support infinite near/far in LFrustum
...
I don't know if anyone is using LFrustum, but just in case, it's good to support this corner case.
2018-07-17 23:00:57 +02:00
rdb
cf240d95c1
gobj: support infinite near distance in PerspectiveLens
...
Useful when rendering with near/far planes flipped around.
2018-07-17 22:59:54 +02:00
rdb
359ce3e9ef
glgsg: fix error with glObjectLabel and SSBO
2018-07-17 22:59:23 +02:00
rdb
b5194d9ff2
glgsg: pad SSBOs to 16 byte boundary (required by some drivers)
2018-07-17 22:59:15 +02:00
rdb
06539f5c66
glsl: support passing uint variables to shader
2018-07-17 22:32:34 +02:00
rdb
911a549386
collide: add tube-into-tube collision test
2018-07-17 22:30:06 +02:00
rdb
71b4b807f8
collide: add line-into-box test, improve segment/ray into box
2018-07-17 22:24:35 +02:00
rdb
6cd59807dd
Remove useless test_display.cxx file
2018-07-17 19:38:10 +02:00
rdb
799f0b4f78
glgsg: work around driver bug extracting buffer texture data
...
Some drivers would report the wrong internal format. But it's silly that we query the internal format anyway, since buffer textures have a fixed sized internal format.
2018-07-17 17:04:50 +02:00
Mitchell Stokes
e4cf73378c
Merge remote-tracking branch 'origin/master' into deploy-ng
2018-07-15 14:38:05 -07:00
Mitchell Stokes
c33ae8a95f
Merge branch 'master' into deploy-ng
2018-07-15 12:42:51 -07:00
rdb
61084a3f4e
pgraph: work around C++11 bug in something or other (see #355 )
2018-07-12 14:24:40 +02:00
rdb
10fe8659c6
gobj: work around a deadlock in GeomCacheManager::flush()
2018-07-12 14:22:27 +02:00
rdb
e41eeaae23
glgsg: if 32-bit unorm depth is not available, fallback to float
...
This prevents falling back to 24-bit depth if 32-bit depth is requested.
2018-07-12 14:17:02 +02:00
rdb
828233a8f2
glgsg: support gl-depth-zero-to-one to get same NDC Z range as D3D
2018-07-12 14:13:32 +02:00
rdb
16daf08e42
glgsg: fix some GCC warning messages
2018-07-11 13:33:50 +02:00
rdb
ff3d005230
x11display: fix Xlib thread safety problems
2018-07-11 13:33:21 +02:00
rdb
55146b9f82
dxgsg9: fix compilation error with WeakPointerTo comparison
2018-07-09 17:09:11 +02:00
rdb
fbce833aae
pgui: reduce unnecessary locking in PGItem
...
A deadlock has been observed if the lock is held while traversing the scene graph, so the need for locking in cull_callback is now reduced.
2018-07-09 16:13:01 +02:00
rdb
abe20fc489
fmod: return NullAudioSound if file does not exist
...
This matches the OpenAL behaviour, and is needed to fix the unit tests on macOS.
2018-07-08 21:49:37 +02:00
rdb
c6ed4e1836
general: don't cast to regular pointer when returning a PointerTo
...
This is inefficient because it induces an unnecessary ref()/unref() pair when we just need to move the pointer out of the function. Thanks to 23128e4695 , we can now move between related pointer types, making the .p() hack unnecessary.
2018-07-08 21:40:58 +02:00
rdb
23128e4695
express: support casting between compatible PointerTo types
...
This makes it possible to implicitly convert a PT of a derived type to a (C)PT of a base type, without needing to first convert it to a regular pointer. This also applies to moves, which are now more efficient due to the lack of need for ref/unref pair even if the pointer type is not exactly the same.
2018-07-08 21:33:49 +02:00
rdb
409231d214
express: make WeakPointerTo cast operators explicit
...
This prevents accidentally (and unsafely) decaying a WeakPointerTo to a regular pointer.
2018-07-08 21:25:08 +02:00
rdb
fb82a1c557
express: enable WeakPointerToBase comparison operators on Win32
...
I'm not sure why they were ifdeffed out, but they should certainly be available so that it is possible to compare WeakPointerTo in a thread-safe manner.
2018-07-08 21:22:25 +02:00
rdb
269d154aea
chan: fix thread-unsafe access of WeakPointerTo
2018-07-08 21:15:40 +02:00
rdb
eda47c7f3b
bullet: support Plane class in BulletPlaneShape
2018-07-08 21:13:13 +02:00
rdb
835a895c51
windisplay: don't adjust in_window during get_pointer
...
This restores the old behaviour from before 29a08932ea , which makes in_window true during pointer capture (ie. click-and-drag) even if the cursor leaves the window.
X11 behaviour is already not to adjust in_window.
Fixes #363
2018-07-07 22:55:45 +02:00
Brian Lach
fd227f6492
bullet: allow creation of BulletCapsuleShape from CollisionTube
2018-07-06 13:31:00 -04:00
rdb
d4d582484f
display: fix ability to make screenshots in multithreaded pipeline
...
Problem is that WGL is strict about binding context in different thread while it is still bound in another thread. Either way we need to make sure the draw thread is not rendering, so if you call get_screenshot() from a thread other than the draw thread, it uses the GraphicsEngine to wait until the draw thread is idle and then asks it to do the get_screenshot().
Fixes #360
2018-07-05 19:02:37 +02:00
rdb
b85fead09d
wgldisplay: report context binding error, keep track of thread
...
This isn't really a complete solution, just a stopgap measure to prevent a crash.
2018-07-05 17:55:39 +02:00
rdb
5fe294a467
bullet: prevent softbody with AABB out of bounds from asserting
...
See #357
2018-07-05 12:48:11 +02:00
rdb
96a48a6848
glgsg: fix issue with extract_texture_data and buffer textures
...
It would always extract the last-created buffer texture, not the texture in question.
2018-07-04 20:56:07 +02:00
rdb
00888518fe
gobj: add F_r32i and F_r32 to TexturePeeker
2018-07-04 20:31:08 +02:00
rdb
f2976b03ec
gobj: add alignment support and move semantics to SimpleAllocator
2018-07-02 12:55:18 +02:00
rdb
f5a78d599d
putil: make LinkedListNode moveable
2018-06-30 21:38:45 +02:00
rdb
94cbdc563b
general: fix a few more compiler warnings
2018-06-30 17:19:23 +02:00
rdb
11723b27ee
device: various warning fixes for input-overhaul on Linux
2018-06-23 23:30:44 +02:00
rdb
234fd675b1
Merge branch 'master' into input-overhaul
2018-06-23 23:24:09 +02:00
David Carlsson
371e60c768
bullet: Change the b2p sync-order to allow parenting BulletWheels to a BulletVehicle
...
Parenting a BulletVehicle's wheels to the chassis-BulletRigidBodyNode now works as expected. Previously doing this would make the wheels appear to be positioned one frame ahead of the chassis, because the wheel's position were synced before the chassis' position.
For more information see issue #250 .
Closes #349
2018-06-23 00:02:10 +02:00
David Carlsson
c18abad8c3
bullet: Interpolate BulletVehicle-wheel transform before syncing it to panda
...
Bullet automatically interpolate most bodies for us (for example the "chassis"
of a BulletVehicle), but BulletVehicle-wheels must be manually interpolated by
calling 'updateWheelTransform()'. Otherwise they will slowly rubber-band
between their intended position and a position one frame ahead in time.
For more information see issue #250 .
2018-06-23 00:01:41 +02:00
rdb
29a08932ea
display: improve mouselook smoothness significantly, esp if low FPS
...
This problem occurs when movePointer is used to reset the mouse back to the center every frame, a very common way to implement mouselook on Windows (which has no relative mouse mode). Any movement between the last event loop run and the call to movePointer is destroyed, resulting in quite choppy mouselook in most implementations.
The solution is for getPointer to always return the latest mouse cursor position. This goes a long way but is not 100% perfect; see the discussion in #359 for other solutions.
Fixes #359
2018-06-22 23:58:56 +02:00
rdb
927fcda817
shader: fix shader newline error with Intel drivers
...
It appears that Intel drivers always need a newline at the end of the file.
2018-06-22 20:53:56 +02:00
rdb
582cc2991e
pipeline: add TypeHandle for CycleData if DO_PIPELINING is set
...
This helps to identify CycleData when tracking memory usage via MemoryUsage.
2018-06-22 20:52:44 +02:00
rdb
b0bbc66f06
bullet: document that sweep_test_closest is convex-only in API ref
...
Closes #356
2018-06-19 00:37:29 +02:00
rdb
886e1c2f16
general: fix many compilation warnings in GCC 8
2018-06-19 00:37:28 +02:00
rdb
835aab5424
physx: fix compiler errors
2018-06-15 18:05:41 +02:00
rdb
d48695cb2e
glgsg: fix occasional WeakPointerTo dereference
2018-06-14 22:51:35 +02:00
rdb
19e1b1d877
pgraph: add version of RenderState::get_attrib(_def) taking a CPT
2018-06-14 22:51:12 +02:00
rdb
f804b10d45
Fix more compiler warnings
2018-06-14 22:49:45 +02:00
rdb
83f637ea9f
ffmpeg: fix compilation for older FFMpeg versions
2018-06-14 19:00:13 +02:00
rdb
c1fbeaea51
display: allow full access to all 4 of each aux buffer category
...
I think there was some confusion about how set_aux_rgba (and friends) worked; it seems the original intent was to toggle each individual buffer whereas it is actually interpreted as a count of how many of these buffers should be enabled. We should try to clarify the API and/or replace it with something better as soon as possible.
2018-06-14 16:08:33 +02:00
Sam Edwards
b2bfb31114
general: Remove `using std::*` from headers
...
Also remove most `using namespace std;` statements. The only one that remains is in py_panda.h.
Closes #350
Closes #335
2018-06-14 16:04:49 +02:00
rdb
d284cedbea
movies/ffmpeg: support grayscale and grayscale-alpha videos
...
Fixes #352
2018-06-14 14:22:56 +02:00
rdb
9231694f8f
gobj: fix Python 3 support for GVADHandle::get_(sub)data/set_(sub)data
...
That said, you should really be using the buffer protocol; you can create a memoryview() directly around the GeomVertexArrayData.
2018-06-14 14:11:34 +02:00
Younguk Kim
d22da73a4c
Fix macro redefinition warning
2018-06-14 09:33:19 +09:00
Sam Edwards
69d5fcf3b0
pgraph: Fix use of incomplete GeomNode in PT(GeomNode)
2018-06-12 16:18:15 -06:00
Sam Edwards
a971bc1dfc
general: Break apart BUILDING_PANDAGL
2018-06-12 16:15:45 -06:00
Sam Edwards
768f78306a
general: Break apart BUILDING_PANDAEGG
2018-06-12 16:15:25 -06:00
Sam Edwards
e73c25d15e
general: Break apart BUILDING_PANDAPHYSICS
2018-06-12 16:15:04 -06:00
Sam Edwards
7e61891c09
general: Fix more DLL linkage and EXPCL_PANDA_ macros
2018-06-12 16:14:33 -06:00
rdb
eab8b1c7a3
tform: MouseWatcher sort should uniquify duplicates
...
Also change the code to use range-for when appropriate, which improves code readability.
2018-06-12 13:44:24 +02:00
rdb
65217a258d
tform: allow calling MouseWatcher::add_region with same region twice
...
Previously, this was an error. Now, it will simply silently be ignored, making it behave more like a set.
2018-06-12 12:45:48 +02:00
rdb
b88bd99704
Various compiler warning fixes
2018-06-12 12:38:07 +02:00
rdb
494ba40c5e
Fix compilation error on Android
2018-06-11 14:35:37 +02:00
Sam Edwards
bc596797a3
general: Resolve some warnings unique to Windows
2018-06-10 02:25:10 -06:00
Sam Edwards
3c6ebb56bd
general: pvector<unsigned char> -> vector_uchar
2018-06-10 02:25:10 -06:00
Sam Edwards
f1eb811c0e
general: Break apart BUILDING_PANDAEXPRESS
2018-06-10 01:37:31 -06:00
Sam Edwards
b8bc1bb5e9
gobj: Include, don't forward-declare, BamCacheRecord in shader.h
...
Closes #346
2018-06-10 01:37:13 -06:00
rdb
ba2de46beb
Merge branch 'master' into input-overhaul
2018-06-08 15:23:47 +02:00
Sam Edwards
7790f8429d
general: Fully qualify header references into the std namespace
...
Closes #341
2018-06-07 10:35:12 +02:00
rdb
b7f8ddfe35
dxgsg9: fix type mismatch in min() call
2018-06-07 10:34:47 +02:00
rdb
8a9d83b604
physx: fix compile error
2018-06-04 17:28:13 +02:00
rdb
be282627a8
express: make PointerTo directly initializable from nullptr
2018-06-04 11:21:18 +02:00
Sam Edwards
f0fc6e6d56
express: Fully qualify std::nullptr_t
2018-06-03 16:56:53 -06:00
Sam Edwards
5e82671084
general: Do away with TYPENAME macro
2018-06-03 16:36:34 -06:00
Sam Edwards
e2b4353800
general: Replace NULL (and 0 as pointer) with C++11 nullptr
...
Exceptions to this replacement are:
- .c files
- Headers included by a .c file
- stb_image.h
- dr_flac.h
- Strings
- Comments
2018-06-03 16:35:13 -06:00
Sam Edwards
92d2f5e195
general: Don't use NULL where not appropriate
2018-06-03 16:31:01 -06:00
Sam Edwards
d422d74abb
general: Clean up asserts which were abusing NULL
2018-06-03 16:26:44 -06:00
Sam Edwards
ebe1b0763f
express: Allow WeakPointer comparisons to nullptr
...
This saves us from having to do casts like:
if (foo == (const FooType *)nullptr) {
...
}
2018-06-03 16:26:44 -06:00
rdb
57602d750f
cocoadisplay: don't crash if window/buffer fails to open
2018-06-03 22:35:37 +02:00
rdb
eb960669a5
display: fix assert when window fails to open
...
The assert is being triggered because the window is already being removed in open_windows. It does not really matter if it returns false anyway, as long as the window is removed one way or another.
2018-06-03 22:33:59 +02:00
rdb
c08339e8ce
ShaderGenerator: fix error with normal map and only ambient light
...
Closes #331
2018-06-03 22:30:40 +02:00
rdb
e0245d2777
First step towards eliminating `using namespace std;` ( #335 )
2018-06-03 20:32:23 +02:00
rdb
298147bb39
Give several additional classes constexpr constructors
...
This is useful because these types are created at static init time, and giving them a constexpr constructor and trivial destructor lets them be created during constant initialization, which helps to prevent static init ordering issues.
2018-06-03 10:45:58 -04:00
rdb
21d8c29645
More warning fixes
2018-06-03 06:45:35 -04:00
rdb
213ae6b029
Change some .T files to new docstring style that were missed
2018-06-01 20:44:30 +02:00
Sam Edwards
159b43e563
general: Address a few more compiler warnings
2018-06-01 02:54:13 -06:00
rdb
283d43f988
putil: workaround macOS 10.6 compile error until #300 is fixed
...
[skip ci]
2018-05-30 23:29:59 +02:00
rdb
190c553c57
dtool_config.h: remove some macros for ancient C++ compilers
2018-05-30 23:15:24 +02:00
rdb
aa1b06f132
putil: make BitMask et al literal types
2018-05-30 23:04:43 +02:00
rdb
db5dd98d33
general: further warning fixes, use -Wno-unused-variable if NDEBUG
...
Disabling unused variable checking is needed in NDEBUG builds because of the heavy use of temporary variables in asserts.
2018-05-30 22:51:04 +02:00
rdb
6b726fa697
general: fix various compiler warnings and issues exposed thereby
2018-05-30 11:09:35 +02:00
Sam Edwards
32e1ca2252
general: Fix several miscategorized EXPCL_PANDA_* macros
2018-05-29 22:49:35 -06:00
Sam Edwards
a251c6dd8f
general: Change HAVE_LOCKF to PHAVE_LOCKF
...
HAVE_LOCKF is already defined by pyconfig.h in
(at least) Python 3.6 - changing the macro name
here avoids warnings
2018-05-27 14:06:14 -06:00
Sam Edwards
24c8ef9887
general: Fix missing include
2018-05-27 14:06:08 -06:00
rdb
8d84c58d73
express: explicitly declare defaulted Datagram copy/move ctor/assign
...
Fixes #329
2018-05-27 15:38:19 +02:00
rdb
3d49986ce2
char: fix crash during Character destructor (regression)
...
This was a regression in 0bb81a43c9 which was not keeping an edge case in mind if a weak pointer is locked during object destruction. This issue was fixed by 525a05ea2b1d00a1db901f883f1755943aeff33c, but that is not enough since it causes CharacterJointEffect::get_character() to return null now, so we need a separate method to check if a CharacterJointEffect belongs to a given character. This is more efficient, too.
Fixes #330
2018-05-27 15:37:45 +02:00
rdb
f2d429b817
express: weakptr.lock() should return null during object destruction
...
This came up in #330 ; the Character destructor caused something to call lock() on a weak pointer to that character, which would induce a ref() and unref() pair, but since the refcount was 0, this would call the destructor and thereby create infinite recursion.
I considered instead calling mark_deleted() inside unref() so that the callbacks get to run before the object is actually deleted, and was_deleted() will become true as soon as unref() reaches 0. However, this would require grabbing the lock in unref() to be fully thread-safe, since we would need to bring the refcount to 0 and mark the object as deleted in one atomic operation, so this would be an unacceptable general performance penalty.
Instead, WeakPointerTo::lock() now atomically increments the reference count if it is not already zero, and returns null otherwise. This should be safe because the object cannot be deleted while the WeakReferenceList lock is held.
2018-05-27 15:37:03 +02:00
Sam Edwards
0ce9dc98b1
general: Move inclusion of checkPandaVersion.h to dtoolbase
...
This includes it everywhere, meaning developers no longer must
remember to include it in each metalib init file.
2018-05-26 18:39:24 -06:00
Sam Edwards
e4c9526e08
ffmpeg: Make read_packet return AVERROR_EOF
...
Newer versions of FFmpeg deprecate returning 0 to indicate
EOF, and instead request use of AVERROR_EOF.
The oldest supported versions of FFmpeg/libav will treat any
error code the same as returning 0.
Fixes #315
2018-05-26 15:17:43 -06:00
rdb
5c9705c21c
pgraph: fix crash accessing python_tags via dict property
...
Fixes #326
2018-05-24 22:44:08 +02:00
rdb
ec04dbed0c
gobj: fix static init ordering issue with VertexTransform cycler
...
This comes up when building with DEBUG_THREADS; there is a PipelineCycler created at static init time, and the type tracking in Pipeline won't work properly if the CData's parent's TypeHandle has not yet been initialized.
2018-05-24 21:40:48 +02:00
rdb
2e7bca90b0
express: fix PointerToArray coercibility regression, fix clear()
...
This was caused by the assignment operators not being visible to interrogate.
2018-05-24 21:39:54 +02:00
rdb
323ddc7d67
putil: fix UpdateSeq::fresh().is_special() return value
2018-05-24 21:37:58 +02:00
rdb
5e0ce969fe
Work around clang 3.1 compile error with static constexpr
...
There is a bug in clang versions before 3.2 (including the one shipped with Xcode) that makes it give a "conflicting types" compile error when there is a static constexpr function defined outside the class. The way to work around this is either to remove one of the "static" or "constexpr" keywords, or to simply put the definition inline.
See: https://stackoverflow.com/a/17494592/2135754
I would try and upgrade Xcode to version 5 to see if the problem is fixed, but the buildbot still runs OS X Lion (10.7) and the last version of Xcode that works on Lion is 4.6.3, so it seems easier to just apply these workarounds for now.
2018-05-24 14:34:03 +02:00
rdb
8eeab7a26a
dxgsg9: fix compile error due to WeakPointerTo changes
2018-05-24 14:26:21 +02:00
rdb
3077316782
general: use proper deleted funcs instead of stubs with asserts
...
This gives better compile-time diagnostics and saves on code, while also better communicating intent.
2018-05-23 23:35:27 +02:00
rdb
9fad3dba60
general: remove macros for compatibility with non-C++11 compilers
...
Now that we require MSVC 2015, we no longer need all this nonsense, so we can write cleaner code.
2018-05-23 23:33:05 +02:00
rdb
f45ddcab2f
general: switch to C++11 Lockable semantics for mutexes
...
This renames acquire/release to lock/unlock in order to be compatible with std::lock_guard and std::unique_lock (which will eventually replace the *MutexHolder classes). It will also allow us to typedef MutexImpl to std::mutex later on.
2018-05-23 20:37:56 +02:00
rdb
3653413cd4
bullet: fix BulletSoftBodyNode::get_node deadlock
2018-05-23 16:55:17 +02:00
rdb
941fda6ec3
pgraph: fix comparisons between WeakNodePath and NodePath
...
Previously it would only work correctly if the WeakNodePath appeared on the left side of the comparison operator.
2018-05-20 15:57:23 +02:00
rdb
14f118b672
pgraph: expose WeakNodePath to Python
2018-05-20 15:56:58 +02:00
rdb
0bb81a43c9
express: make a thread safe weak pointer implementation ( #321 )
...
To access a WeakPointerTo in a thread-safe way, use something like this:
if (auto ptr = weak_ptr.lock()) {
..use ptr as regular PointerTo
}
The new implementation no longer needs a reference to be stored to all weak pointers on the WeakReferenceList; a mere count of weak pointers is sufficient. Therefore, callbacks theoretically no longer require a WeakPointerTo to be constructed.
The WeakPointerTo class is not actually atomic; it could be made so, but I don't believe it's worth it at this time.
2018-05-15 13:40:21 +02:00
Sam Edwards
47f7d3f297
general: Add headers explaining the renamed config_*.h
2018-05-14 02:36:42 -06:00
Sam Edwards
52e7c952b3
putil: Rename config_util to config_putil
2018-05-14 02:36:42 -06:00
Sam Edwards
87c11d8018
pstatclient: Rename config_pstats to config_pstatclient
2018-05-14 02:36:42 -06:00
Mitchell Stokes
bf1b486e5a
Merge branch 'master' into deploy-ng
2018-05-06 11:30:01 -07:00
Mitchell Stokes
ebe2588a50
Merge branch 'master' into deploy-ng
2018-05-06 11:21:13 -07:00
Mitchell Stokes
aaf7ff9a6c
device: Define BTN_DPAD* if not present
2018-05-05 18:12:52 -07:00
rdb
549301d0f0
putil: keep reference to objects queued for writing
...
This prevents a crash when a reference counted object is destroyed right after a write_pointer call.
Fixes #310
2018-05-05 23:10:41 +02:00
rdb
b45726001e
task: fix double free when failing to retrieve coroutine exception
2018-05-05 20:53:04 +02:00
rdb
9db74bca1d
task: use consistent ordering for tasks with same sort value
...
We don't guarantee a specific order in this case, especially because they can be run in either order if there is more than one thread, but it is still useful to have a defined order for single-threaded task chains. To that end, tasks
are now run in the order in which they were added to taskMgr.add (in absence of any other ordering constraints).
Fixes #309
2018-05-01 15:06:27 +02:00
rdb
3b4d4b0804
glgsg: fix broken upload of downscaled texture without mipmaps
...
Fixes #306
2018-04-30 19:13:54 -04:00
Donny Lawrence
574000aedd
Add getter and setter for Content-Type header
...
Fixes #296
Closes #305
2018-04-21 11:20:18 +02:00
deflected
1ac351d594
bullet: Allow intractions with bullet world during tick callbacks
...
- Release the global lock during the user tick callback
and allow interactions with bullet world
- Acquire the lock again after the callback
Signed-off-by: deflected <deflected@users.noreply.github.com>
2018-04-20 21:29:08 +03:00
rdb
e6e39cce0e
bullet: fix deadlock in get_manifold
2018-04-20 12:51:26 +02:00
rdb
0cef19fd90
putil: more validation in DatagramInputFile::get_datagram
...
Intended to fix test_file_corrupt for 32-bit platforms.
See discussion in 89be2c19af
2018-04-11 17:29:49 +02:00
Younguk Kim
9ca0d089a6
event: fix a crash when removing a task is not owned by user
2018-04-10 19:45:54 +09:00
rdb
b0cece7faf
Merge branch 'master' into deploy-ng
2018-04-08 15:44:32 +02:00
rdb
b4d29e6096
express: allow using bytes() on Datagram
...
Closes : #297
2018-04-06 17:42:59 +02:00
rdb
de6d753f79
net: don't use get_message() when constructing datagram header
...
This is causing an unnecessary copy operation.
2018-04-06 17:17:04 +02:00
rdb
664d628cbc
device: D-Pad mappings for DualShock 3 driver on Linux
2018-04-05 21:05:02 +02:00
Mitchell Stokes
ff66728212
LinuxInputDeviceManager: Fix fcntl() call
2018-04-04 19:11:03 -07:00
rdb
94476fd1f0
glgsg: fix invalid operation error with multisample FBO
...
Panda is forgetting to reset the current FBO when resolving multisamples.
2018-04-04 21:46:01 +02:00
rdb
7cbdd3b6c4
gobj: release GIL for (un)compress_ram_image
2018-04-04 21:36:26 +02:00
rdb
77f33f3642
device: never use inotify_init1(), it is not in older kernels
2018-04-04 21:32:44 +02:00
rdb
e9ae7dcc40
Use vector_uchar instead of string for binary network/file data
...
This distinction allows us to better support Python 3, since it will raise exceptions when trying to put arbitrary binary data in a str object.
This also adds some convenience functions for efficiently initializing a Datagram or PTA_uchar from a vector_uchar.
2018-04-02 23:17:14 +02:00
Sam Edwards
fadbcd91e5
ffmpeg: Bump supported minimums lower for libav 9.20
...
We need to support this because Ubuntu 14.04 ships with this
version, and has no "backports" option to bring in a newer version
(without use of a PPA or compiling it yourself).
We can consider raising the minimums again once Trusty is EOL.
2018-03-31 05:53:45 -06:00
Sam Edwards
bb6e0abeba
ffmpeg: Switch the video cursor to the new decoding API
2018-03-31 04:17:07 -06:00
Sam Edwards
8d36908556
ffmpeg: Use `avcodec_flush_buffers` when seeking
...
Previously this would close and reopen the codec context;
that's entirely unnecessary, as all supported versions of
libavcodec support flushing the buffers instead.
2018-03-31 04:17:07 -06:00
Sam Edwards
e430428703
ffmpeg: Add async audio decoding loop
...
This leverages libavcodec >= 57.37.100's new asynchronous API,
which both allows decoding in hardware and in a separate thread,
and in any case would free up more CPU time for Panda's app loop.
This also avoids use of the now-deprecated `avcodec_decode_audio4`
2018-03-31 04:17:07 -06:00
Sam Edwards
62f9de101a
ffmpeg: Tell swresample the channel count
2018-03-31 04:17:07 -06:00
Sam Edwards
4ffd364415
ffmpeg: Simplify ffmpegAudioCursor.cxx a little
...
This refactors the `reload_buffer` loop so all of the decode
logic is inside the loop, and all of the resampling logic is
outside.
2018-03-31 04:17:07 -06:00
Sam Edwards
eb591674e0
ffmpeg: Prefer av_packet_alloc over allocating AVPacket ourselves
...
av_packet_alloc/av_packet_free will know the correct size of AVPacket,
even if the ABI should change. So, we use it when it's available.
2018-03-31 04:17:07 -06:00
Sam Edwards
9596095294
ffmpeg: Use AVStream.codecpar
...
AVStream.codec is deprecated as of libavformat version 57.41.100,
so if this version is detected, we switch to AVStream.codecpar instead.
Note this also makes it necessary to construct and use our own codec
context - but doing that is a cleaner approach anyway.
2018-03-31 04:17:07 -06:00
Sam Edwards
cc77c5dbe2
ffmpeg: Clean up ffmpeg_prefer_libvpx implementation
2018-03-31 04:17:07 -06:00
Sam Edwards
148010c5f0
ffmpeg: Remove code to support deprecated versions
...
See previous commit; now that we're enforcing explicit minimums, any
code to support anything older than those minimums is trivially dead.
2018-03-31 04:17:07 -06:00
Sam Edwards
a19e9aea63
ffmpeg: Enforce minimum supported versions of ffmpeg
...
lavcodec: 54.86.100
lavformat: 54.59.106
lavutil: 52.13.100
These are the versions included in FFmpeg 1.1, which is the oldest
release that works with Panda already: we've been using
`av_opt_set_sample_fmt` (introduced in FFmpeg 1.1) since
03e96d8c4a (August 2013) and nobody has
complained since. In other words, I'm not dropping support for anything
here, I'm just making the supported versions explicit.
2018-03-31 04:17:07 -06:00
Sam Edwards
65210a5e49
ffmpeg: Fix a typo in version detection
...
See f0b3e08e9c
2018-03-31 04:17:07 -06:00
Sebastian Hoffmann
78377ca10c
Cursor after newline character appears on beginning of next line.
...
DirectEntry.updateNumLines updates text geom.
DirectEntry API less inadequate.
Closes #257
2018-03-30 20:17:31 +02:00
deflected
30cf1dbbb1
pgraphnodes: Fixed the type of texture bytes in sceneGraphAnalyzer
...
- Corrected the type of texture bytes variable as it is possible
to wrap it around
Signed-off-by: deflected <deflected@users.noreply.github.com>
2018-03-30 14:38:39 +03:00
rdb
b8af5bf64f
cocoa: fix compile error caused by faulty merge
...
[skip ci]
2018-03-29 14:44:10 +02:00
Donny Lawrence
7830aab21d
cocoa: Fix unresponsive menubar, add default item for application menu.
...
Closes #259
2018-03-29 14:30:16 +02:00
rdb
7062da944a
cocoa: fix ability to type AltGr characters and dead keys
...
It would seem that interpretKeyEvents/insertText would be the right way to do this, but while that does handle AltGr keys correctly, it does not handle dead keys at all. This approach seems to do the right things.
2018-03-29 14:22:59 +02:00
rdb
95bffa8503
Fix crash when typing unicode characters above 7fff into text field
...
Can be reproduced when typing Shift+AltGr+5 into a DirectEntry on macOS.
2018-03-29 14:17:39 +02:00
rdb
63b1e44977
framework: fix pview crash when exit is called inside render_frame
...
This can happen when a system event (eg. on macOS) triggers a terminate from within process_events.
This is a workaround for a common error; the proper fix is not to put PandaFramework in the global scope.
2018-03-29 14:11:21 +02:00
Sam Edwards
9dd37e9dbc
general: Add guards to ensure proper BUILDING_ macros defined
...
This is designed to sanity-check the buildsystem, ensuring that the
expected BUILDING_ macros are defined at the expected time. It
also helps catch cases where the wrong BUILDING_/EXPCL_ macros
are used.
2018-03-25 13:17:52 -06:00
Sam Edwards
98797d0090
pandabase: Introduce BUILDING_ defines for each component
...
This reverses the relationship between EXPCL_PANDA_COMPONENT
and BUILDING_PANDA, where BUILDING_PANDA is just shorthand for
BUILDING_PANDA_COMPONENT and BUILDING_PANDA_COMPONENT itself
sets the EXPCL_PANDA_COMPONENT defines.
Also removes EXPCL_PANDA.
2018-03-25 13:17:52 -06:00
Sam Edwards
29318992d9
metalibs/panda: EXPCL_PANDA -> EXPCL_LIBPANDA
2018-03-25 13:17:52 -06:00
rdb
69d24993b6
bullet: fix compilation error with Bullet 2.81
2018-03-22 15:30:31 +01:00
deflected
3a88308f45
bullet: Cleanup copying of shapes
...
- Fixed copy constructors
- Dropped operator= from shapes
Signed-off-by: deflected <deflected@users.noreply.github.com>
Closes #283
2018-03-22 15:22:44 +01:00
deflected
733085e38e
bullet: Write saved _up value for cylinder shapes
...
- Missed in previous commit.
Signed-off-by: deflected <deflected@users.noreply.github.com>
2018-03-22 15:22:37 +01:00
deflected
5fec62b6fa
bullet: Corrected possible false check
...
- When a bullet world is created it sets the filter
algorithm callback that will use. Later changes to
PRC config data should not lead to false assumptions
that the bullet world is working with the new config.
Signed-off-by: deflected <deflected@users.noreply.github.com>
Closes #289
2018-03-22 15:17:27 +01:00
deflected
09a9a8ff22
multifile: Return vector_uchar from readSubfile
...
- Return vector_uchar from readSubfile instead of
string. This will correct problems with Python 3 unicode
strings and will return bytes instead.
Signed-off-by: deflected <deflected@users.noreply.github.com>
Closes #290
2018-03-22 15:12:30 +01:00
Sam Edwards
cfd70ebead
general: Remove '#pragma interface'/'#pragma implementation'
...
The GCC documentation states that, as of GCC 2.7.2, these aren't
necessary for proper program behavior. The documentation further
discourages their use because they don't suppress unnecessary code
duplication.
The Panda codebase these days uses "extern template class" instead,
which tells the compiler not to perform implicit template expansion
because an explicit template expansion is available for linking
elsewhere in the program. This is a more compiler-neutral way of
achieving the same thing as '#pragma interface', making
'#pragma interface' not only redundant, it could also mask problems
in the "extern template class" machinery.
2018-03-20 14:36:19 -04:00
Sam Edwards
2031409a6e
gobj: Fix missing include
2018-03-18 00:27:05 -06:00
rdb
adbab8deae
x11display: reenable confined mode on window reconfigure
...
Fixes #280
2018-03-16 21:22:23 +01:00
Sam Edwards
477e6b7561
dxml: EXPCL_PANDA -> EXPCL_PANDA_DXML
2018-03-15 12:50:22 -06:00
Sam Edwards
32aceab7b4
grutil: Fix missing EXPCL_PANDA_GRUTIL
2018-03-15 12:48:44 -06:00
Sam Edwards
350f437fbe
pandabase: Alphabetically sort pandasymbols.h
...
[skip ci]
2018-03-12 18:53:58 -06:00
Sam Edwards
de2e35ee9a
pandabase: Remove unused defines from pandasymbols
2018-03-12 18:33:16 -06:00
rdb
aebdefcf60
Merge branch 'master' into deploy-ng
2018-03-11 23:01:10 +01:00
rdb
94ceace5af
android: add activity for running Python programs
...
It can be launched from the termux shell using the provided run_python.sh script, which can communicate with the Panda activity using a socket (which is the only way we can reliably get command-line output back to the program.)
The Python script needs to be readable by the Panda activity (which implies it needs to be in /sdcard).
The standard library is packed into the .apk, and loaded using zipimport. Extension modules are included using a special naming convention and import hook in order to comply with Android's strict demands on how libraries must be named to be included in an .apk.
[skip ci]
2018-03-11 22:53:08 +01:00
rdb
8e8283cbe1
android: enable writing stdout/stderr to a socket
...
This can be done by setting the extra string org.panda3d.OUTPUT_URI to tcp://host:port
Writing to a log file can still be done using file:///path/to/log.txt
[skip ci]
2018-03-11 22:36:17 +01:00
rdb
319b331553
ShaderGenerator: fix M_modulate_gloss regression
...
It was mapping the alpha channel of M_modulate_gloss to the glow channel.
2018-03-11 16:40:21 +01:00
rdb
e0f8d7885a
video4linux: don't block on reading camera frames
...
Add v4l-blocking variable to enable the old behaviour.
2018-03-11 16:39:00 +01:00
rdb
2563b65249
video4linux: support greyscale pixel format (eg. IR cameras)
2018-03-11 16:33:01 +01:00
Sam Edwards
5f14d9c48f
char: Move JointVertexTransform::_matrix to CharacterJoint
...
The rationale is that CharacterJoint should contain all of the joint
state information, and JointVertexTransform should be pretty much devoid
of state so that we don't have to worry about synchronizing it.
JointVertexTransform::_matrix was just a cached/precomputed matrix
that transforms from original vertex positions to animated vertex
positions, so moving it to CharacterJoint doesn't change any engine
functionality.
This also removes the useless lock on recomputing that matrix. It was
useless because it was computing from shared state in CharacterJoint
that wasn't properly synchronized, but this would have to be fixed by
making CharacterJoint pipeline-cycled - a lock won't do.
2018-03-10 20:26:02 -07:00
Sam Edwards
280b13a289
char: Remove references to dead "ComputedVertices" class
...
This hasn't been a thing for nearly 13 years.
2018-03-10 20:15:39 -07:00
rdb
5d2110c644
bullet: add force_update_all_aabbs property to BulletWorld
2018-03-08 12:19:22 +01:00
rdb
15f6ed1ba2
androiddisplay: remove error messages leftover from debugging
2018-03-08 11:39:03 +01:00
rdb
9a31478744
task: remove accidentally committed debug message
2018-03-08 11:19:43 +01:00
Sam Edwards
d8b48a3837
openal: `ptr != 0` -> `ptr != NULL`
2018-03-06 19:02:05 -07:00
Sam Edwards
99dc462174
openal: assert -> nassert
2018-03-06 19:02:05 -07:00
Sam Edwards
c89bb3d030
openal: "reattempt" -> "retry"
2018-03-06 19:02:05 -07:00
Sam Edwards
cb85d01de6
openal: Always use INLINE in .I files
2018-03-06 19:02:05 -07:00
Sam Edwards
a10cd7d8bb
openal: Always use release_sound_data
...
This simplifies cleanup() a little bit.
2018-03-06 19:02:05 -07:00
Sam Edwards
9a5d7d8254
openal: Add several asserts
...
This also includes a few slight style fixes.
2018-03-06 19:02:05 -07:00
Sam Edwards
1a6fb5300b
openal: Be explicit about what constructs like `_sound != 0` mean
2018-03-06 19:02:05 -07:00
Sam Edwards
fd5ce687b3
openal: Add cleanup guards to buffer functions
...
Without this, the audio might encounter an error, call cleanup()
on itself, and (if in the middle of update()) try to dereference
its recently cleaned-up _sd pointer.
Fixes #230
2018-03-06 19:02:05 -07:00
Sam Edwards
6ca0a68042
openal: Retry deleting a buffer until success
...
The rationale for this change is Apple's OpenAL implementation,
which needs a little time after the
`alSourcei(source, AL_BUFFER, 0);`
call before any buffers used by that source are free for deletion.
The defaults in the config variables are such that the OpenAL manager
will attempt to delete a buffer up to 6 times (that is, the original
attempt plus 5 reattempts), with delays of 1ms, 2ms, 4ms, 8ms, and 16ms
before each reattempt - which means it'll wait a grand total of 31ms for
a buffer to be free before assuming that some even greater problem must
be happening and giving up.
2018-03-06 19:02:05 -07:00
Sam Edwards
1862100bac
openal: Don't assume alSourceUnqueueBuffers is FIFO
2018-03-06 19:02:05 -07:00
Sam Edwards
1b1c76b2e8
pgraph: Fix "Unknown render mode 5" errors
...
This happened when a M_dual transparent object is given the
M_filled_wireframe render attrib. M_dual would copy the transparent
parts of the object to the transparent back-to-front bin, before
the M_filled_wireframe handler could deal with the M_filled_wireframe
flag.
The solution is just to switch the order - let M_filled_wireframe be
dealt with before the transparency code gets a chance to make a copy.
2018-03-05 06:10:25 -07:00
Sam Edwards
fd6eebb7fe
bam: Fix circular reference with ClipPlaneAttrib
...
What's being addressed here is the circumstance where an ancestor of
a PlaneNode has a ClipPlaneAttrib that references said PlaneNode.
The code here is just being copied out of LightAttrib, which has the
exact same mode of operation (it nominates a sorted list of on/off
NodePaths) and a compatible structure. LightAttrib has had this problem
in the past, so using the same solution makes sense.
2018-03-05 05:26:54 -07:00
Sam Edwards
74bb2fef2e
bam: Fix typo in ClipPlaneAttrib::fillin
2018-03-05 05:26:50 -07:00
Sam Edwards
d088341da1
bam: Log object IDs when spamming read
2018-03-05 05:26:45 -07:00
rdb
43914f4e75
Merge branch 'master' into deploy-ng
2018-03-02 09:27:38 +01:00
deflected
8ad4c8e23c
bullet: Fixed deadlock when loading from collision solids
...
- Fixed deadlock when loading ghost nodes from collision solids and
have non-identity scale applied.
Signed-off-by: deflected <deflected@users.noreply.github.com>
2018-03-01 23:36:10 +02:00
rdb
9638eb47eb
Add support for geometry with adjacency information
...
Example code: https://gist.github.com/rdb/7cebb8941b962c59d5a092048efb3855
2018-03-01 21:20:19 +01:00
rdb
f535a641e4
Merge branch 'master' into deploy-ng
2018-02-27 20:53:28 +01:00
rdb
4e640fcb60
Merge remote-tracking branch 'deflected/panda3d-master'
2018-02-27 20:41:01 +01:00
Sam Edwards
01b0835797
pandabase: Remove reference to DIRECTORY_DLLS
...
Nothing defines this under any circumstances.
Also this moves the various component EXPCLs and EXPTPs
within the include guard of the entire header.
2018-02-26 00:25:03 -07:00
rdb
a5beccc99e
chan: fix crash when AnimControl is destroyed in threaded pipeline
...
See #254 for related discussion.
2018-02-24 12:15:56 +01:00
deflected
8fd4584bd0
grutil: Add control over heightfield filtering in shaderTerrainMesh
...
Signed-off-by: deflected <deflected@users.noreply.github.com>
2018-02-23 13:37:07 +02:00
Sam Edwards
e3cc3eff82
putil: Optimize DatagramInputFile::get_datagram
...
This new loop is better in two ways:
1) It reads straight into the Datagram's internal buffer,
saving the trouble of allocating an intermediate buffer
and wasting CPU time to copy out of it.
2) It's more cautious in the face of large (>4MB) lengths,
which are more likely to be due to corruption than the
datagram *actually* being that large.
2018-02-23 01:38:27 -07:00
Sam Edwards
10f1ffa9a7
express: Fix Datagram::modify_array()
...
This just copies the array initialization out of append_data, so a
COW/uninitialized Datagram can be initialized with modify_array()
2018-02-23 01:38:26 -07:00
Sam Edwards
04cb128140
cftalk: Remove this
...
It was an incomplete experiment for distributing rendering pipelines over
a LAN of computers all working in concert.
Who knows, it may return someday. Until then, it's best not to keep it
around.
2018-02-22 15:18:34 -07:00
Sam Edwards
f8e321d155
bam: Start more strongly checking pointer types in complete_pointers
...
This just starts with PandaNode, and uses DCAST_INTO_R instead of DCAST
to catch bad bams. BamWriter should never produce bam output that will
trigger this; I found this with a fuzzer.
I'm unsure about the tradeoff between bam loading performance and
robustness in the face of bad bams. It certainly makes a lot of sense
in debug builds, but we might want to consider a compile flag that
forces bam-related asserts always on even in release builds.
2018-02-22 04:57:29 -07:00
Sam Edwards
293465a516
bam: Add sanity-check against object IDs appearing twice
...
Found this by fuzzing; not concerned about updating the writer as
the writer itself should never do this. This is just to protect
against segfaults in the face of corrupt or malicious bams.
2018-02-22 03:13:33 -07:00
Sam Edwards
47a9aa4a80
bam: Simplify the resolve_*_pointers loops in BamReader
...
This should also be a slight performance boost since breaking out
of the loop upon discovering an incomplete child object means we don't
bother resolving everything else just to discard it all.
2018-02-22 02:03:33 -07:00
deflected
6c7894f68d
terrain: set ShaderTerrainMesh heightfield wrap mode to clamp
2018-02-21 15:27:15 +01:00
deflected
9afdb78d94
bullet: make thread-safe by adding global lock mechanism
...
Also addresses some memory leaks.
2018-02-21 15:04:47 +01:00
Sam Edwards
50b3b87ad5
openal: Explicitly signal a needed cleanup from require_sound_data
2018-02-20 00:55:49 -07:00
Sam Edwards
f970bc3229
openal: Don't return OpenALAudioSounds that fail to initialize
...
Also don't register them in _all_sounds, where they won't remove themselves
due to having already called cleanup() on themselves.
Additionally stops a sound in a cleaned-up state from being passed to the
app and played.
2018-02-20 00:55:49 -07:00
Sam Edwards
ad7669e12a
mathutil: Update FFTCompressor for FFTW3
...
This has been due for a while. The last FFTW 2.x release was in 1999.
Note that this does change some of the loops; this has two benefits:
1) The halfcomplex storage order is now explained with a comment.
2) It fixed the special case "don't break a run of bytes for a zero" which
was never triggering due to the value not being *exactly* 0.0.
I have tested these changes against older FFT-compressed animation .bams
and no noticeable decompression changes are present, so a .bam version
bump is not necessary.
2018-02-17 22:32:38 -07:00
rdb
5c90f64182
text: fix is_whitespace() assertion when invalid chars are included
2018-02-17 20:50:18 +01:00
rdb
95eee0cab2
android: load prc files from assets. Move assets to /android_asset
2018-02-17 20:09:24 +01:00
rdb
8dea93bf38
android: fix touch/stylus taps triggering mouse1 for compatibility
2018-02-17 18:42:39 +01:00
rdb
6bd1976892
android: support writing png/jpg/webp via android.graphics.Bitmap
2018-02-17 18:40:08 +01:00
rdb
854d736882
pgraph: fix alignment error in 32-bit Windows with Eigen
...
Fixes #251
2018-02-17 18:30:58 +01:00
Sam Edwards
ab7dbebf3f
general: Remove lingering references to Helix
...
Support for Helix has been dropped long ago; it's very unlikely to return.
See also de4280ea20 .
2018-02-14 17:26:35 -07:00
rdb
c15c05f642
android: enable resume key events
2018-02-06 22:44:53 +01:00
rdb
d269f7c6c3
android: allow stdout/stderr capture using extra field on intent
...
This allows launching the Panda apk from termux and getting command-line output back to termux.
2018-02-06 22:42:40 +01:00
rdb
ae0f82911b
android: allow launching pview by opening models (using Intents)
...
Also add code to show notification toasts.
Also enable model cache by default (pointing to app cache dir)
2018-02-06 22:36:21 +01:00
rdb
10789f6936
android: fix issue loading some image files
2018-02-06 22:33:57 +01:00
rdb
c1fccd311b
android: properly support multiple Java threads
2018-02-06 22:32:22 +01:00
Sam Edwards
8a7b47d501
audio: Fix memory leak in OpenAL
2018-02-04 23:06:34 -07:00
Sam Edwards
fb6c92cf08
express: Move all vector_* types to dtoolutil
2018-02-04 17:12:03 -07:00
Sam Edwards
fbe373dfdc
general: Fix includes
2018-02-04 17:11:55 -07:00
Sam Edwards
0d079e2b80
general: Remove execute modes from ordinary text files
2018-02-04 17:11:43 -07:00
rdb
09bd662919
Merge branch 'master' of github.com:panda3d/panda3d into input-overhaul
2018-02-04 11:37:09 +01:00
rdb
c1fd2e46de
input: more device support on macOS (incl. SpaceNavigator)
2018-02-04 11:32:59 +01:00
rdb
6ada306184
input: split out macOS implementation of device manager
2018-02-04 11:00:43 +01:00
rdb
9e6d0d91ad
input: fixes for older Android API levels (thanks to pmp-p)
2018-02-04 10:58:36 +01:00
deflected
50dafd087d
bullet: Fixed calculating of Box dimensions
...
- Fixed wrong claculation of box dimensions, when
creating BoxShape from solids
Signed-off-by: deflected <deflected@users.noreply.github.com>
2018-02-02 23:19:47 +01:00
deflected
ce79656141
bullet: Fixed crash when rendering bulletDebugNode
...
- Fixed crash when rendering bulletDebugNode without calls
to doPhysics. This is caused by _debug_world pointing to
invalid memory, while _debug_stale is true when bulletDebugNode
is initialized.
Signed-off-by: deflected <deflected@users.noreply.github.com>
2018-02-02 23:19:39 +01:00
nosyliam
b562aba4e0
Support static linking with FMOD
...
Closes #241
2018-02-02 23:19:23 +01:00
rdb
18afcdbd0a
android: handle right mouse button, more external keyboard keys
2018-01-29 20:09:58 +01:00
rdb
0fa8980be2
android: fix activity lifecycle issues (froze upon quit or resume)
...
It seems Android doesn't want an application to just quit on its own accord; after main() returns we need to kindly request Android to finish the activity and keep handling events until Android destroys the app.
2018-01-29 20:08:29 +01:00
rdb
7c1dd4050b
android: change assets mount dir, point binary path to .apk
...
The binary path we get from /proc/self/exe isn't very useful; the path to the .apk is barely more useful but it still doesn't make a whole lot of sense. It might make more sense to set it to the path of the native .so that is being loaded by NativeActivity.
2018-01-29 19:44:39 +01:00
rdb
e301e5fe5e
android: fix various compilation errors
2018-01-29 19:36:51 +01:00
rdb
94385e865f
Merge remote-tracking branch 'origin/master' into input-overhaul
2018-01-28 14:31:45 +01:00
rdb
d35e6c5113
android: include android_native_app_glue in repository
...
These files are from the NDK, but don't seem to be included in termux. Since they are two small files that change very rarely, it's easier to just include them in the Panda repo.
[skip ci]
2018-01-28 14:27:35 +01:00
rdb
6e476e77a3
input: support imitation SNES USB gamepad on Windows
2018-01-28 13:47:11 +01:00
rdb
04352e152d
ShaderGenerator: fix TextureStage mixup when stages are disabled
...
This fixes a regression that caused the wrong textures/stage settings to be applied when a texture stage was being optimized out (eg. when a normal map is present while lighting is disabled).
2018-01-26 15:39:30 +01:00
rdb
6a1d717e90
dxgsg9: support texture clear, gracefully handle 0x0 textures
2018-01-26 14:33:13 +01:00
rdb
f3aaa12adc
tinydisplay: support texture clear, gracefully handle 0x0 textures
2018-01-26 14:31:40 +01:00
rdb
d6cf575225
pgraph: fix LightAttrib.compose resulting in wrong on_light values
2018-01-26 14:30:21 +01:00
rdb
3da32b7b7c
input: split out LinuxInputDeviceManager from InputDeviceManager
2018-01-25 20:15:16 +01:00
rdb
2347587077
x11: respect cursor updates when in confined/relative mouse mode
2018-01-24 19:11:48 +01:00
rdb
f189b817c6
input: fix name/manufacturer/serial fetching for some evdev devices
2018-01-23 12:59:14 +01:00
rdb
712b246dd6
input: reverse rudder direction to match yaw, reverse 3D mouse roll
...
Although having the rudder reversed is less intuitive, this makes it match the Panda convention for "heading".
2018-01-23 12:58:40 +01:00
rdb
8bd617c4ee
input: new windows input manager based on raw input
...
The new implementation uses a message-only window to register raw input events.
XInput is still used when possible, but raw input is being used to handle device detection. (XInput is only enabled when an XInput device is plugged in, which also prevents us from having to load and poll the XInput library unnecessarily.)
For raw devices, the Windows HID parser library is used to parse the raw data. Unfortunately, the Windows 7.1 SDK does not ship hid.lib (which is in the WDK 7.1.0), so I am dynamically loading hid.dll to prevent pulling in a dependency on the WDK. (But perhaps we can ship hid.lib in the thirdparty libraries?)
Input devices other than XInput gamepads and the 3D mouse have not been tested very well yet. Adding keyboard and mouse support is still a TODO.
This also splits out the Windows implementation of InputDeviceManager into a separate subclass; it is intended that the other implementations will follow suit.
2018-01-22 22:05:14 +01:00
rdb
3977b9c57c
collide: fix multithreaded pipeline crash with CollisionVisualizer
2018-01-18 21:23:54 +01:00
rdb
fe0c182830
cocoa: fix app launching regression on macOS
...
The regression was introduced by ef7f856c46
Fixes #227
2018-01-17 19:46:30 +01:00
rdb
4c4288f491
display: lock GraphicsEngine mutex in remove_all_windows()
2018-01-17 19:46:11 +01:00
rdb
fe3dab192f
gobj: slightly more efficient string handling in Shader::make()
2018-01-15 23:27:46 +01:00
rdb
1cada85e6b
ShaderGenerator: fixes for combine alpha blending
2018-01-15 12:20:27 +01:00
rdb
6a323081c0
pipeline: fix regression with Thread.getCurrentTask() disappearing
...
This method was accidentally un-exposed by 2e20a0f16e
Fixes #226
2018-01-10 20:17:43 +01:00
rdb
dee4cd6201
bam2egg: support exposed joints properly
...
Also, don't use structured tag unless it seems necessary to preserve the structure
2018-01-10 20:14:25 +01:00
rdb
ba9ea065e4
gobj: performance improvement for CPU animation
...
In particular it seems that decomposition is slow, so the code to handle the transformation of the normal column now tries harder to avoid it, especially in the case of a scale of 1.
Also see #222
2018-01-08 21:33:32 +01:00
rdb
73b4217cad
input: fix joystick button and axis mapping on macOS
2018-01-07 19:34:49 +01:00
rdb
96f6bd7fa5
input: fixes for joysticks in Linux compatibility mode
2018-01-07 17:39:44 +01:00
rdb
2523bb0326
input: fixes for 3D mouse axes on Linux
2018-01-07 17:36:52 +01:00
rdb
9fbdefe120
input: add analog trigger emulation on Linux
2018-01-07 17:26:48 +01:00
rdb
4f739e88cf
input: joystick buttons, use yaw/pitch/roll for axes, more devices
...
Also adds format_* functions to get string from enum value.
2018-01-07 14:50:54 +01:00
rdb
27bd7ae4ac
Merge branch 'master' into input-overhaul
2018-01-07 12:08:59 +01:00
rdb
b5e9f23e3b
glesgsg: fix compile error on Arch Linux
...
[skip ci]
2018-01-07 12:07:49 +01:00
rdb
36636aad81
Merge remote-tracking branch 'origin/release/1.9.x'
2018-01-05 19:48:32 +01:00
rdb
eaf3983c06
ode: fix trimeshes in double-precision ODE builds
...
Fixes #174
2018-01-05 15:40:59 +01:00
rdb
42f8978236
pgraph: sort "off" texture stages when loading from .bam
...
This fixes an issue where states loaded from .bam file containing more than one "off" texture stage would not compose properly.
Fixes #179
2018-01-05 15:16:42 +01:00
rdb
428c5cbbf3
gles2gsg: fix compilation error with OpenGL ES 2
2018-01-05 14:34:15 +01:00
rdb
5980b0b9ab
openal: fix warning spam every frame in newer AL implementations
...
This fixes error messages being generated of the form:
AL lib: (WW) alSetError: Error generated on context 0x801cf8800, code 0xa003
This is caused by alSourceUnqueueBuffers being called without first checking whether processed buffers are available using alGetSourcei.
Fixes #180
2018-01-05 13:37:00 +01:00
rdb
58623b09bd
input: add missing has_vibration() method to InputDevice
2018-01-03 14:48:47 +01:00
rdb
962e6e31e4
Merge branch 'master' into input-overhaul
2018-01-03 14:46:13 +01:00
rdb
1073f5abde
pgraph: sort "off" texture stages when loading from .bam
...
This fixes an issue where states loaded from .bam file containing more than one "off" texture stage would not compose properly.
Fixes #179
2018-01-03 14:29:03 +01:00
rdb
4bac9efffe
display: fix dispatch_compute and extract_texture_data in MT pipeline
...
This is required to make the test suite run with pipelining enabled.
It's necessary to let the draw thread do these tasks because that's where the OpenGL context is bound to. However, we need to let it access the data from the calling thread, so we have to temporarily change the pipeline stage of the draw thread.
I'm not really happy about this solution; it would be better to temporarily make the context current to the app thread, but we need a window for that, which we don't currently require to be passed into that method.
2018-01-03 00:13:48 +01:00
rdb
512f305c12
display: fix assertions when removing window that isn't open yet
2018-01-03 00:09:30 +01:00
rdb
7ea16fd772
putil: fix copy constructor of SimpleHashMap
2018-01-02 19:07:43 +01:00
rdb
92787264de
putil: fix assertion when global clock is created on non-main thread
2018-01-02 17:11:27 +01:00
Younguk Kim
84bdce01f2
Fix crash by end iterator while closing a window
2018-01-01 18:14:48 +09:00
rdb
a96b171095
glgsg: only consider texture/texgen in munger if !gl_parallel_arrays
...
This could possibly be used to workaround issue #218
2017-12-31 09:51:25 +01:00
rdb
a6f737d4eb
linmath: make raising quaternion to power more meaningful
...
Fixes #160
2017-12-31 09:30:32 +01:00
rdb
7ee9467f8d
shadows: fix shadow buffer creation deadlock in multithreaded pipeline
...
Fixes #162
2017-12-30 17:47:15 +01:00
rdb
39abc66025
gobj: reduce unnecessary use of threading primitives in constructors
2017-12-28 00:20:59 +01:00
rdb
e04ddbef9a
pipeline: fix multithreaded render pipeline deadlock
...
This deadlock happens when another thread holds a cycler lock and then attempts to call Pipeline::remove_cycler() while Pipeline::cycle() is running on the main thread.
The fix for this problem is threefold:
* Allow remove_cycler (and add_cycler) to be called while a cycle is in progress, by introducing a second lock
* Let cycle() not block if a dirty cycler can't be locked, instead trying other cyclers first
* Adding a way to let remove_cycler() check whether a cycler is currently in use by the main thread, and yielding if so
More information is on https://github.com/panda3d/panda3d/issues/217
Fixes #217 (also see LP 1186880)
2017-12-27 22:59:38 +01:00
rdb
8a94a0d439
loader: fix crash getting result from async load
2017-12-27 22:56:21 +01:00
rdb
588d41ed7e
Fix assorted compiler warnings
2017-12-24 15:12:58 +01:00
rdb
0281f306e1
express: add PointerToArray.count()
2017-12-24 15:09:21 +01:00
rdb
540122e703
gobj: fix crash with ShaderBuffer
2017-12-24 12:41:52 +01:00
rdb
ba8cbfd056
input: fixes for Linux scoring and axis/button mapping
...
This adds a list of known devices so that we can assign custom behavior to them. I tested this with the T.Flight Hotas X flight stick and the NVIDIA Shield Controller.
2017-12-22 17:45:06 +01:00
rdb
920f1b75e3
input: support macOS gamepads, joysticks, raw keyboards/mice
...
I tested gamepads with a wireless 360 controller and a wired Xbox One controller using the 360Controller driver. I tested the joystick support using a T.Flight Hotas X.
2017-12-22 15:33:33 +01:00
rdb
12cfc93b79
input: let InputDevice manage axis remapping, add C_twist axis
2017-12-22 15:21:50 +01:00
rdb
ef9803b25e
Changes to support compiling input-overhaul branch on macOS
2017-12-22 14:59:52 +01:00
rdb
c911ba8059
Merge branch 'master' of github.com:panda3d/panda3d into deploy-ng
2017-12-21 15:10:53 +01:00
rdb
ed5e5386b9
AsyncFuture improvements, incl. support for gathering futures
2017-12-21 14:07:01 +01:00
rdb
ef7f856c46
cocoa: support windowless offscreen rendering on macOS
...
Fixes : #183
2017-12-20 14:27:08 +01:00
rdb
f82a940878
glgsg: fix shader version in macOS 3.2+ context
2017-12-20 14:16:05 +01:00
rdb
f0b21ee969
Support old Python 2 buffer protocol in PTA and Texture ram_image
...
This enables passing eg. str and array.array objects in Python 2
2017-12-20 01:23:26 +01:00
rdb
096d54de00
Add double-precision versions of encode_sRGB_uchar
2017-12-19 23:44:15 +01:00
rdb
061e0c4862
cocoa: allow getting a GL 3.2+ context on macOS 10.7+ using gl-version
2017-12-19 23:38:45 +01:00
rdb
9dcfcbf5fa
texture: support store() on more component types (incl. sRGB)
...
This changes behaviour for sRGB textures, which weren't previously converting to the correct color space.
Also add unit tests for storing to PNMImage.
Closes : #212
2017-12-19 20:02:49 +01:00
rdb
e9a50c8898
texture: fix get_clear_data() return type, make it work with sRGB
2017-12-19 19:27:36 +01:00
rdb
e4e24eee56
glgsg: use T_float when downloading 24-bit depth textures
...
This is to match behavior with previous Panda3D versions. See #212
2017-12-19 18:44:44 +01:00
rdb
348b1c344d
texture: support uint/float/half/sRGB textures in TexturePeeker
2017-12-19 18:44:18 +01:00
rdb
9d2e1f92cb
input: fix for Windows compilation, reenable raw input
2017-12-17 16:33:23 +01:00
rdb
8e6cf2a60b
Merge branch 'master' into input-overhaul
2017-12-17 13:04:15 +01:00
rdb
29f50be15e
Fix bug: copy-to-ram depth texture binding gets format set to RGB
...
This was a regression introduced by be8f4de337
Fixes : #212
2017-12-16 21:03:08 +01:00
rdb
9bfc425b75
Fix assertion when rendering bounding volumes (broken since 6f8b379)
2017-12-12 23:27:51 +01:00
rdb
193e4b5f59
interrogate: clean py_panda.h; use macros to access Dtool_PyInstDef
2017-12-12 23:03:38 +01:00
rdb
3e83f8c65e
Fix priority argument ignored in NodePath::set_shader_input
2017-12-12 15:25:21 +01:00
rdb
46189dc1bf
Compile fix for macOS build
...
[skip ci]
2017-12-04 22:52:23 +01:00
rdb
2e20a0f16e
Implement awaitable thread-safe future for async operations
...
This introduces AsyncFuture as a new base class of AsyncTask. It's modelled after asyncio's Future class, except that it is thread-safe and you can use result() to block the current thread waiting for the future to finish (of course this is not necessary for use with coroutines).
AsyncFuture should be used for any operation that finishes in the future, to get the benefit of awaitability within coroutines as well as a standard interface for querying status and results of the operation as well as cancelling it. As such, it's been implemented in various places, including texture.prepare() and win.trigger_copy().
Note that AsyncFuture is intended to be used *once*; it cannot be used more than once. As an example of how this works, tex.prepare() will return the same future as long as the prepare isn't complete, but when it is done, subsequent calls to tex.prepare() will return a new future.
2017-12-04 22:25:28 +01:00
Mitchell Stokes
d90e59ca2d
Merge branch 'master' into deploy-ng
2017-12-02 18:36:47 -08:00
rdb
69b3468b2c
interrogate: more improvements to seq/map wrappers
...
Gets rid of properties defined as both MAKE_SEQ_PROPERTY/MAKE_MAP_PROPERTY, which are just a bad idea. Instead, adds a way for map properties to define a separate "keys" interface.
Fixes : #203
2017-11-27 17:29:50 +01:00
rdb
3be22679a4
display: also avoid getting more than 24 color bits if 0 were requested
...
See issue #197
2017-11-26 00:06:03 +01:00
Mitchell Stokes
fcb1d9308b
Merge branch 'master' into deploy-ng
2017-11-25 14:58:25 -08:00
Mitchell Stokes
aba26bd862
Merge branch 'master' into deploy-ng
2017-11-25 14:55:47 -08:00
rdb
749b23a190
Fix support for pickling NodePaths (broken in 1b1d80c)
...
Fixes : #199
2017-11-25 23:12:47 +01:00
rdb
bec9ff8a40
loader: fix UB in try_load_file when loading file without known type
2017-11-23 01:15:44 +01:00
rdb
37572b312c
loader: try appending .bam to filename if loading doesn't find model
2017-11-22 19:27:14 +01:00
rdb
46c8852eed
text: fix for certain versions of HarfBuzz
2017-11-20 20:40:51 +01:00
rdb
0edac2e94a
Work around gamma issue with 64-bit color depths on NVIDIA hardware
2017-11-16 23:52:12 +01:00
rdb
001804113a
ShaderGenerator: make colorscale/texture blending match FFP better
...
A notable change is that the color scale is now applied *before* texture blending, matching the FFP. If this breaks anything, we might want to add a configuration option for this.
This also implements the remaining combine modes, CM_dot3_rgb and CM_dot3_rgba, and fixes the broken CM_subtract mode (which currently worked the same way as CM_add).
Fixes : #189
2017-11-16 15:58:13 +01:00
consultit
e13d14fe3d
bullet: add bam serializability of remaining shapes
...
From #123 with significant changes from rdb.
Closes : #123
2017-11-08 01:53:53 +01:00
rdb
1b1d80cd27
More thoroughly fix issues with pickling Panda objects in Python 3
...
This also adds DatagramBuffer, a class for writing datagrams to memory and reading them from there again.
2017-11-08 00:02:35 +01:00
rdb
08629ef1a0
Fix a few compiler warnings
2017-11-07 15:38:40 +01:00
rdb
483a491ed7
interrogate: simplify coercion code
...
This remove support for coercing non-ReferenceCounted types that are neither default-constructible nor move-assignable, but it turns out none of the classes we really need it for matches that.
It further cuts down on the amount of code that is being generated to support coercion in cases where it makes absolutely no sense.
2017-11-06 19:53:38 +01:00
rdb
dd2806c8bd
Mark constructors 'explicit' for which coercion makes no sense
2017-11-06 19:47:38 +01:00
Younguk Kim
a26662ce46
Fix compile error by missing header file
2017-11-02 18:04:36 +09:00
rdb
075cb14cbb
bullet: implement debug draw via cull callback for efficiency
...
Now the debug drawing will no longer happen if the debug node is not being visited by the cull pass, ie. in another scene graph. Furthermore, the generation code has been optimized a bit more.
This change means it no longer inherits from GeomNode. Future improvements could include better culling (which is currently disabled entirely).
Closes : #130
2017-11-01 21:55:54 +01:00
rdb
745b51f10f
ShaderGenerator: fix M_blend to match fixed-function pipeline
...
See panda3d/panda3d#178
2017-11-01 20:20:38 +01:00
rdb
c17db98aec
Merge branch 'pr-pview-adjust-camera-clip' of git://github.com/eswartz/panda3d
2017-10-31 20:15:38 +01:00
rdb
4cd826e63a
Merge branch 'fix-audio-distance-factor' of github.com:nikolmiv/panda3d
...
Closes : #13
2017-10-31 19:31:27 +01:00
frainfreeze
f22c0cdd83
Add README.md files for various directories
...
Closes : #10
2017-10-31 19:20:24 +01:00
rdb
0c0f9adab9
Support coroutines and async/await in the task manager and loader
2017-10-31 18:56:41 +01:00
rdb
51090ccf12
pgraph: fix LightLensNode assert due to bad refcount in LightAttrib::compose
2017-10-20 20:12:25 +02:00
rdb
407c8e8712
bullet: add interface to access BulletTriangleMesh vertices/triangles
2017-10-20 19:53:02 +02:00
rdb
8a35f360bd
Fix build error
2017-10-18 12:29:44 +02:00
rdb
7d721a33a6
Restore setShaderInput overload taking 4 numbers, but deprecate it
2017-10-18 11:26:20 +02:00
rdb
410049fd4b
Improvements for ShaderGenerator-based programs:
...
* Disable state munger, which isn't needed
* Reflect updates to TextureStage properties (Fixes #178 )
* Also respect combine mode and rgb scale changes
* Allow rehashing and clearing generated shader cache
State munger is now disabled whenever any shader is applied. Panda assumes that any custom shader will apply color scale by itself.
2017-10-18 11:16:29 +02:00
rdb
6ecfcb1fd3
Store munged states more efficiently, without weak key maps
2017-10-17 23:21:38 +02:00
rdb
8078fa2b38
More efficiently store SimpleHashMap with empty values
2017-10-17 23:04:16 +02:00
rdb
bb60e8c373
display: fix segfault when output is removed during render
...
Fixes : #176
2017-10-15 18:48:53 +02:00
rdb
0db3d27247
ShaderGenerator: fix updating color of combine stages with CS_constant
...
This also changes the function of TextureStage::uses_color(), which no longer incorporate TextureStage::involves_color_scale()
Fixes : #177
2017-10-15 17:06:59 +02:00
rdb
51d948a7fa
Support compilation for Python 3.7
2017-10-13 12:40:47 +02:00
Eric Klawitter
5758fdf8f5
Fix 'of of' doc typos
2017-10-09 14:56:40 -05:00
rdb
bf190f7306
interrogate: support MAKE_MAP_PROPERTY
2017-10-09 00:02:46 +02:00
rdb
0e2b14cf4c
pgraph: custom binding for set_shader_input()
...
Should be faster and more reliable at PTA handling
We no longer need the interrogate perf hack for the first-arg InternalName
Fixes : #161
2017-10-08 17:50:28 +02:00
rdb
8ed85c80c8
linmath: permit single-argument/fill value for UnalignedLVecBase4
2017-10-06 23:59:17 +02:00
rdb
dfa47e55ce
express: fix PTA get_data in Python 3, fix CPTA construction
...
Fixes : #173
2017-10-06 18:24:32 +02:00
rdb
be8f4de337
display: add_render_texture should set correct texture format
2017-10-05 17:35:31 +02:00
rdb
85a9cdd052
Add a way to get access to OpenGL texture index
2017-10-05 17:34:26 +02:00
Younguk Kim
b71ee446e3
Add has_hook functions taking function pointer or callback data in EventHandler
2017-09-24 02:46:00 +09:00
rdb
019df482d6
windisplay: fix origin not changing upon window being dragged
2017-09-19 19:16:48 +02:00
rdb
35349b6224
Expose DatagramOutputFile to Python, add props to DatagramSink
2017-09-17 01:38:59 +02:00
rdb
82eec0302b
ShaderGenerator: fix point light shadow regression
...
Fixes : #167
2017-09-04 13:03:37 +02:00
kamgha
f09d767c6e
pnmimagetypes: introduce png-compression-level PRC variable
2017-08-31 13:03:17 +02:00
rdb
a925e0bcd9
x11: fix loading 24-bpp ico/cur image alpha with width 24
2017-08-29 23:51:15 +02:00
rdb
bbdc5d2341
pnmimage: mark many heavy methods as BLOCKING to release GIL
2017-08-22 20:04:59 +02:00
rdb
4fae81947e
Fix regression (since 6f8b379) causing crash in flattening edge case
2017-08-07 23:00:28 +02:00
rdb
e3d8123940
glsl: fix broken shadowMatrix as member of named light input
...
Fixes : #157
2017-08-07 22:58:02 +02:00
rdb
d1c34c3360
interrogate: support static properties
2017-08-07 22:04:56 +02:00
rdb
65ae1e16bc
ShaderGenerator: support multiple normal maps
...
Uses Reoriented Normal Mapping to blend additional normal maps.
Fixes #156
2017-07-15 20:17:29 +02:00
rdb
f79fbf25c3
ShaderGenerator: big overhaul, don't generate more shaders than needed
2017-07-10 21:55:27 +02:00
rdb
1b690e528f
vfs: don't crash if copy_file can't open output file (LP 1687283)
2017-07-10 21:13:57 +02:00
rdb
8b3ad7348e
cocoa: fix broken mouse events in fullscreen on macOS (LP 1500026)
2017-07-10 19:53:53 +02:00
rdb
925ce854d0
general: make DO_MEMORY_USAGE setting not change ABI compatibility
2017-07-10 19:50:09 +02:00
rdb
5fffbbce47
express: error if Windows-style path is used (LP 1429241)
2017-07-10 14:25:41 +02:00
rdb
2e5051ac04
bullet: fix crash when adding non-indexed GeomTriangles to trimesh
2017-07-10 01:54:37 +02:00
rdb
9a40febdb9
shadows: fix light buffer not being destructed after light removal
...
Fixes LP 1672089
2017-07-09 20:36:13 +02:00
rdb
1fd8af5acd
express: add C++11 methods to ordered_vector
2017-07-09 19:56:56 +02:00
rdb
84520ce21c
display: prefer 24-bit depth buffer on Intel over 16-bit
2017-07-09 19:53:23 +02:00
rdb
a866f9fbcb
audio: fix case of get_speaker_setup/set_speaker_setup methods
2017-07-09 15:47:09 +02:00
rdb
e45af355cc
glgsg: fix multisample FBO regression (on Intel Windows driver)
2017-07-09 15:32:13 +02:00
Younguk Kim
e07e5d0203
Fix assert macros that cause a crash in non-debug
2017-07-05 19:49:46 +09:00
The Cheaterman
86cbdddd76
Fix float precision issues in bulletHeightfieldShape
...
Closes : #152
2017-07-03 22:36:22 +02:00
rdb
fa1c480508
general: clean up use of override keyword
2017-07-03 12:56:23 +02:00
rdb
48c811e112
cull: remove GeomMunger stored on CullableObject
2017-07-03 11:47:59 +02:00
rdb
f57a3f9cde
Hack to remove build warning on MSVC 2010
...
Fixes LP #1700329
2017-07-03 11:13:02 +02:00
rdb
9c4151cb0f
ShaderGenerator: fix TextureAttrib assertion
...
This was caused by af57c829d2 and was triggered by a change in TextureStage sort.
2017-06-22 13:36:47 +02:00
rdb
511b0c10e5
ShaderGenerator: don't generate a shader per Material
2017-06-22 13:35:46 +02:00
rdb
c6dda2a44a
vfs: Show IOError instead of AssertionError if read_file fails
...
The methods are marked non-BLOCKING since the GIL needs to be held while throwing exceptions. We handle the GIL in the extension functions instead.
2017-06-20 21:52:22 +02:00
rdb
b41496b17a
Fix texpad/texpix inputs not updating (fixes CommonFilters resize issue)
2017-06-20 19:15:12 +02:00
rdb
af57c829d2
ShaderGenerator: reduce combinatoric explosion of shaders
...
This is done by:
* Not considering the texture pointer when looking up a generated shader, only type
* Not requiring different shaders based on RescaleNormalAttrib
* Not looking at AlphaTestAttrib unless it is going to be relevant
This should dramatically reduce the number of shaders that are being generated for many scenes, especially since the only thing that differs from object to object is often just the texture.
These changes are also necessary to make b781995ef1 more usable, since prepare_scene may see a slightly different state than is encountered at render time due to code in CullResult adding in an AlphaTestAttrib or RescaleNormalAttrib.
2017-06-20 18:45:49 +02:00
rdb
b781995ef1
ShaderGenerator: prepare_scene now invokes shader generator.
...
This also necessarily removes ShaderGenerator's dependency on a host window.
2017-06-20 16:16:30 +02:00
rdb
90f96fc1a9
Change SimpleHashMap implementation to improve performance of GC.
...
The new implementation stores elements contiguously and keeps a separate sparse array of indices, similar to the new PyPy and CPython implementations. This vastly improves performance when iterating over the individual elements, such as when garbage collecting states, and decreases memory usage.
2017-06-12 19:58:02 +02:00
rdb
ca2e96d296
Fix for certain libjpeg versions that override INLINE macro
2017-06-12 19:46:59 +02:00
rdb
6b882ac767
Fix slow garbage collect after using a lot of states
2017-06-09 20:12:49 +02:00
rdb
2e8d09a99c
Workaround for compiler bug when producing debug build
...
(with thanks to consultit)
2017-06-09 19:48:44 +02:00
rdb
828f1c10ca
Support loading Opus audio files via libopusfile.
2017-05-24 22:21:54 +02:00
rdb
257311cc0c
physics: fix crash in edge case when PhysicalNode dies before Physical
...
Also add more assertion checks
2017-05-24 20:21:48 +02:00
rdb
904209b277
Split out interrogate jobs for dtool directories from express
2017-05-24 13:44:52 +02:00
rdb
53794e8e36
Get rid of unnecessary DisplayRegionBase class
2017-05-24 13:42:01 +02:00
rdb
d576c6b638
Improvements to generated API docs, especially in direct tree.
...
Also add an entry point for pfreeze.
2017-05-24 13:30:21 +02:00
rdb
c52bab1805
stb_image: update to v2.15, support 16-bit PNGs
...
Also removes SSE2 runtime detection, which was causing compilation issues on Fedora
Also now supports HDR images with #?RGBE header
2017-05-24 13:19:18 +02:00
rdb
68be3c6dfe
More efficient light handling; sort lights by highest priority first
2017-05-15 16:59:44 +02:00
rdb
a71a89acc2
putil: make UpdateSeq a literal type
2017-05-15 16:34:13 +02:00
rdb
7755a2e1c7
shadows: provide dummy shadow maps for nonexistent/noncasting lights
2017-05-15 14:50:50 +02:00
rdb
652f2d7f21
bullet: improve performance of adding geometry to BulletTriangleMesh
2017-05-14 22:17:41 +02:00
deflected
560fd4eb3d
panda: Get rid of few warnings
...
- Correct missing override
- Correct deprecated XKeycodeToKeysym
- Correct deprecated @exec for FreeBSD pkg plist
Signed-off-by: deflected <deflected@users.noreply.github.com>
Closes #144
2017-05-14 00:02:33 +02:00
rdb
81e414030e
Fix RenderState cache leak - gc did not work properly
...
(Thanks to deflected for helping to track this down)
2017-05-13 23:30:09 +02:00
rdb
e15cfd74e8
Prevent assertion when calculating bounds for geom without vertices
2017-05-13 21:40:59 +02:00
wolfgangp
a1a99c49c0
Buffer protocol support for (Const)PointerToArray of vectors and matr… ( #148 )
2017-05-06 02:16:07 +02:00
rdb
160f652d58
text: use HarfBuzz for text shaping; support right-to-left text
2017-04-25 12:25:31 +02:00
rdb
e67ebd80cd
glgsg: deal with false negatives with feature checks on Intel
2017-04-14 19:40:02 +02:00
rdb
fa1b656961
glgsg: fix get_host() of GL FBO. Fixes LP 1672560 shadow bug
2017-04-09 22:14:20 +02:00
rdb
f7af155e93
Compile with VS 2015 Express, build assimp on Windows
2017-04-03 13:57:40 +02:00
sean5470
97cd007af3
bam2egg: retain model nodes
...
added code to retain model nodes that are not DCS nodes.
2017-04-03 02:28:37 +02:00
rdb
2980bbc955
android: fix error when uploading BGRA image
2017-04-03 01:41:28 +02:00
rdb
6f8b379bda
Big patch full of performance improvements
...
This particularly benefits applications with a lot of nodes.
2017-04-03 01:41:23 +02:00
rdb
163c923c82
Backport various fixes for 1.9.4
2017-03-31 18:08:49 +02:00
wolfgangp
f773bf6328
Add properties to Bullet classes ( #140 )
2017-03-29 11:38:39 +02:00
rdb
605ac1189f
text: kerning should respect text scale
2017-03-28 21:13:03 +02:00
rdb
e1c0e7d1d4
text: add experimental kerning support, enabled by 'text-kerning'
2017-03-27 19:15:09 +02:00
rdb
9d05044a9f
shadows: force interocular distance to 0 for shadow cameras
2017-03-23 12:22:34 +01:00
rdb
d8066e19b1
Fix assertion when using Texture.load_sub_image to load entire image
2017-03-22 22:42:21 +01:00
rdb
64a7fbab87
glgsg: fix assertion encountered when trying to use pointer textures
...
Fixes LP 990089
2017-03-10 23:01:11 +01:00
Younguk Kim
0406a49edc
Fix include guard typo.
2017-03-10 15:51:11 +01:00
rdb
63be56cd0e
Backport part of b21e8fdf32 that fixes an issue with geometry generation when multithreaded pipeline is enabled
...
Fixes bullet soft body issue as well as LP 1671639
2017-03-10 15:46:44 +01:00
rdb
20085d182a
Backport 4a8819b0bd (MeshDrawer fixes and improvements)
...
* Fix random number generator on Windows (LP 1663895)
* Assert instead of crash when passing in non-Camera to begin() (LP 1663900)
* Prevent repeated calls to generator()/set_budget() from leaking GeomNodes (LP 1663903)
* Make the generator more efficient
2017-03-10 15:44:47 +01:00
rdb
ce736ad093
glsl: fix issue with vertex colors not showing up
2017-03-10 12:25:21 +01:00
rdb
4f299fa71f
Fix compilation when building without threads enabled
2017-03-09 14:31:07 +01:00
rdb
3db8ce2562
Fixes for ARM build
2017-03-08 12:28:06 +01:00
rdb
72262ea15a
Fix compiler issues on Windows
2017-02-21 21:38:46 +01:00
rdb
8ec4da2824
Compile fixes for compilers that don't support all C++11 features
2017-02-21 02:45:30 +01:00
rdb
1eaa1bcf70
Fix error when not compiling with clang
2017-02-21 02:27:28 +01:00
deflected
351627a0e3
glgsg: fix false positive for buffer texture detection on OpenGL 3.0
2017-02-21 02:21:50 +01:00
rdb
edb83fe89a
Various optimizations to reduce performance overhead of rendering
2017-02-21 02:20:06 +01:00
rdb
6104e75eb0
bam2egg: generate a sphere from polygon with four vertices instead of two
2017-02-20 15:09:11 +01:00
rdb
b113d9db55
Fix incorrect type hierarchy of HermiteCurve, PandaNode, ShaderGenerator
2017-02-20 00:32:05 +01:00
rdb
53258af876
display: reduce GraphicsEngine traversal overhead a bit
2017-02-20 00:23:21 +01:00
rdb
4a8819b0bd
MeshDrawer fixes and improvements:
...
* Fix random number generator on Windows (LP 1663895)
* Assert instead of crash when passing in non-Camera to begin() (LP 1663900)
* Prevent repeated calls to generator()/set_budget() from leaking GeomNodes (LP 1663903)
* Make the generator more efficient
2017-02-19 22:16:49 +01:00
Jose Luis Cercos Pita
aa00138b34
Support core-only OpenGL contexts in the default build.
...
This is a squashed commit of the following, as well as my own (rdb's) revisions:
commit 80662759a18607743316f75ee6aa4a63c3f8d8e6
Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
Date: Thu Dec 1 15:07:29 2016 +0100
Removed some useless fixed pipeline checks
commit 563b5dbe93b451006ddbf3797aabdda7482ef3de
Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
Date: Thu Dec 1 14:19:21 2016 +0100
Improved the LUMINANCE check system
commit 596036a8bb59d627f703bccfdc399dc31e1723a9
Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
Date: Thu Dec 1 13:30:45 2016 +0100
Removed some useless fixed pipeline checks
commit 0f7fa7cd33860c3cde1b4594731271170301b42d
Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
Date: Thu Dec 1 13:26:07 2016 +0100
Don't try to check if fixed pipeline is available before the context has been generated
commit 56ed18e29dcb0a7cb0feccd0d50038416637427f
Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
Date: Thu Dec 1 13:14:49 2016 +0100
Assuming the fixed pipeline is available in GL 3.1 contexts
commit 73075ead73be21c8ce9a468ed92eb2c8c7d548c4
Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
Date: Fri Nov 4 12:59:45 2016 +0100
Fixed errors while quering for GL_TEXTURE_LUMINANCE_SIZE and GL_TEXTURE_INTENSITY_SIZE in GL >= 4.0 core profile contexts
commit 3f799ed20be22f6f82de13445c5f9515a424ef9f
Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
Date: Fri Dec 16 10:01:03 2016 +0100
Added fixed functions pipeline support check at runtime
Closes: 128
2017-02-19 20:15:54 +01:00
rdb
f5f51c5d5b
Remove OpenSSL includes from headers, so C++ users don't need to have OpenSSL
2017-02-17 16:15:04 +01:00
rdb
21a42f62df
Fix FreeBSD compile error
2017-02-17 13:02:01 +01:00
rdb
78e4c71202
Fix issue with taking screenshots from an FBO
2017-02-17 13:02:01 +01:00
rdb
8c914a2855
Work towards ABI stability wrt allocation. Let MemoryHook take advantage of dlmalloc's internal bookkeeping.
2017-02-17 13:02:01 +01:00
rdb
2acde88695
New alignment code to hopefully fix the alignment issues
2017-02-10 03:01:32 +01:00
rdb
fdffcc280b
Fix compile error for ancient clangs
2017-02-10 00:38:18 +01:00
rdb
dcb793aed4
Clean up cpuid code, make selection of cpu/mem info available on Linux, macOS and FreeBSD
2017-02-09 22:56:37 +01:00
fireclawthefox
f1e1c2b891
Fixes for device button handling
...
Made State enum accessible from python side
Fixed missing state changing in evdevInputDevice class
2017-02-08 17:04:28 +01:00
rdb
cfe810ace7
Add set_shader_inputs for efficiently setting multiple shader inputs
2017-02-06 13:16:27 +01:00
rdb
c3a196860a
downloader: support TLS SNI when negotiating with SSL server
2017-01-28 17:41:09 +01:00
Younguk Kim
ad34bc3eb8
Fix include guard typo.
2017-01-26 00:16:26 +09:00
rdb
a15d84dbeb
Fix compile errors and warnings in MSVC 2010 / GCC 4.6
2017-01-12 15:18:48 +01:00
rdb
e60d1e292e
Make better use of C++ rules for implicit generation; allow PointerTo and some mutex impls to be static initialised
2017-01-12 12:34:15 +01:00
rdb
2de6c85fc9
glsl: fix shadowMatrix for point lights
2017-01-10 19:36:03 +01:00
rdb
749e09d49e
ffmpeg: don't hide last frame of video
...
This is not quite a complete fix, since the last frame of the video won't be shown long enough for it to matter when looping the video. A more complete fix may be needed later.
2017-01-09 23:10:51 +01:00
rdb
4ed199cece
Fix various compile warnings and a few code consistency issues
2017-01-09 20:36:53 +01:00
rdb
72a1a9820b
Fix issues in ancient ffmpeg versions (Eg. Ubuntu Precise)
2017-01-08 17:50:48 -05:00
rdb
41d26284d7
Fix various compilation issues on Mac.
...
Work around bugs in Apple Clang that ships with XCode 4 with C++11 by disabling constexpr
Use move() instead of std::move()
It also looks like we'll have to continue using pystub for tools that use libp3interrogatedb for now.
2017-01-08 17:17:56 -05:00
David Rose
c4d232b0be
publish PfmVizzer destructor to fix leak
2017-01-04 16:56:09 -08:00
David Rose
63eb1636a9
Merge branch 'master' of https://github.com/panda3d/panda3d
2017-01-04 16:28:42 -08:00
David Rose
603f0eb3b1
fix occasional crash in PNMImage::quick_filter_from()
2017-01-04 16:28:38 -08:00
rdb
9facf874ab
Let compiler synthesize QuadDef move assignment operator
...
This hopefully fixes a compile issue with older clang versions.
2017-01-04 23:53:55 +01:00
rdb
cf105f276c
More alignment fixes for 32-byte AVX
2016-12-28 20:23:27 +01:00
rdb
94641c83a0
linmath: use correct 32-byte alignment when compiling Eigen with AVX
2016-12-28 19:18:21 +01:00
rdb
8434914ab6
Merge branch 'master' into input-overhaul
2016-12-28 17:26:58 +01:00
rdb
fa7f385bb8
More work on integrating new input framework
2016-12-28 17:25:55 +01:00
Sam Edwards
ea2305de70
general: Fix missing includes.
2016-12-26 18:11:03 -07:00
rdb
ab5b5e7e74
Merge branch 'release/1.9.x'
2016-12-25 22:47:22 +01:00
rdb
4393455eba
Fix get_keyboard_map on Czech (and other) layouts
...
Now reports proper Unicode name, and doesn't omit keys that don't have a recognised mapping by Panda
https://bugs.launchpad.net/panda3d/+bug/1652145
2016-12-25 16:12:54 +01:00
rdb
59c3aa3ef6
cocoa: don't crash if display server doesn't give us display modes
2016-12-25 09:59:29 -05:00
rdb
45356e85e1
Backward compat with older OpenSSL versions
2016-12-25 11:48:38 +01:00
rdb
28bb737597
Load X11 extensions dynamically; don't expect them to be there at compile time
...
Add x-cursor-size variable for overriding XCursor size.
2016-12-24 22:21:53 +01:00
rdb
122d9dd3ff
Support building with OpenSSL 1.1.0
2016-12-24 22:19:51 +01:00
rdb
2ac1734566
Fix crash when trying to write 16-bit TIFF file (LP bug 1222922)
...
Note: does not actually add support for writing 16-bit tifs; Panda just doesn't crash but automatically downsamples to 8-bit.
2016-12-23 00:36:59 +01:00
rdb
056ea94765
Fix PythonThread crash (LP bug 1245818)
2016-12-22 21:28:19 +01:00
rdb
7d414500c6
Various compile fixes
2016-12-22 11:34:47 +01:00
rdb
e8fbd2f9da
Fix potential crash in shader preprocess code
2016-12-21 18:14:46 +01:00
rdb
62d0d8292e
More texture load/store performance optimisations
2016-12-21 18:04:08 +01:00
rdb
92302942fe
Changes to build on ancient Linux distributions (CentOS 5 / manylinux)
2016-12-21 17:40:49 +01:00
rdb
a13fb0e8ca
Fix compilation issue with older ffmpeg versions
2016-12-21 17:35:45 +01:00
rdb
5aa8618572
Don't error if passing an oversized matrix array to a mat4[1] shader parameter
2016-12-20 23:18:05 +01:00
rdb
eab2a1a733
Add CP_area_priority for area lights
2016-12-19 23:39:50 +01:00
rdb
da79c28a6c
Add RectangleLight class
2016-12-19 23:29:42 +01:00
rdb
4b5c317160
Improve shader caching; cache result of preprocess if cache-generated-shaders is set
2016-12-19 22:26:16 +01:00
rdb
36f2eda9ec
Fix name of "Buffer switch" pcollector in pStatProperties.cxx
2016-12-18 00:12:26 +01:00
rdb
da0d7752c1
Register .webm extension for videos
2016-12-18 00:08:59 +01:00
rdb
b6cb9b0045
ffmpeg: support videos with alpha; add ffmpeg-prefer-libvpx prc var
...
ffmpeg-prefer-libvpx forces ffmpeg to use the libvpx decoder for VP8/VP9 files, allowing the playback of WebM files with an alpha channel.
2016-12-17 00:17:30 +01:00
rdb
34068dc0c1
Implement support for SSBOs
2016-12-13 21:22:17 +01:00
rdb
23645cc407
Fix DDS load crash with certain formats; support R16, RG16, R32, RG32
2016-12-13 21:00:11 +01:00
rdb
b21e8fdf32
COW performance tweaks; also somehow fixes Bullet soft body issue
2016-12-11 15:30:03 +01:00
rdb
9eb04a533d
More texture load/store performance optimisations
2016-12-09 01:41:32 +01:00
rdb
b217752e16
Merge remote-tracking branch 'origin/release/1.9.x'
2016-12-07 23:03:16 +01:00
rdb
a1338b9ac6
Backport to 1.9: fix for distance sorting with gl-coordinate-system changed
2016-12-07 23:00:06 +01:00
rdb
83d54bcdaf
Try to preserve refresh rate when switching display mode on Windows
2016-12-07 22:57:53 +01:00
rdb
b1d61b7b10
Fix back-to-front sorting with gl-coordinate-system set to a custom value
2016-12-07 19:36:31 +01:00
rdb
ceee5e9df9
Show texture names in glBindTexture() calls in spam output
2016-12-07 19:32:01 +01:00
rdb
e778c529b2
Implement Python 3.6 fspath protocol; allow passing a pathlib.Path wherever Filename is expected
...
The Python 3.6 fspath protocol allows passing Filename objects into any Python standard library calls that take a path.
2016-12-07 00:42:44 +01:00
tobspr
3fa5b6b4ee
Add prc variable to force image bindings as writeonly ( #131 )
2016-12-06 18:42:08 +01:00
rdb
6344c05b18
Clean up dynamic loading of Win32 funcs, remove makepanda touchinput setting, remove checks for pre-WinXP
2016-12-05 17:21:09 -05:00
rdb
c410d812ff
Remove some settings from dtool_config.h to prevent rebuilds:
...
- HAVE_OPENCV
- OPENCV_VER_23
- HAVE_FFMPEG
- HAVE_SWSCALE
- HAVE_SWRESAMPLE
2016-12-05 16:32:13 -05:00
rdb
6dc6b05409
Merge remote-tracking branch 'origin/release/1.9.x'
2016-12-05 02:01:44 +01:00
rdb
84789ecdd1
Fix GL compile error on Mac OS X
2016-12-04 21:28:52 +01:00
rdb
2b6e192e5a
Protect against overallocation when reading corrupt texture from bam
2016-12-03 01:04:35 +01:00
Sam Edwards
573dad8dde
general: Fix missing includes.
2016-11-30 19:21:34 -08:00
rdb
1c957b26b4
Fix for getting R8 and R8G8 formats via FrameBufferProperties
2016-11-29 23:07:37 +01:00
rdb
441b791e57
Fix extract_texture_data for buffer textures
2016-11-29 23:05:01 +01:00
rdb
5ad900a413
Bullet fixes: copying compound shapes, compile warnings, motion state alignment
2016-11-29 22:43:28 +01:00
rdb
7db45cb647
Make fetching of p3d_LightSource[n] input clearly defined for non-existent lights
...
Refer to OpenGL 2.1 spec page 61
Closes : #129
2016-11-27 14:25:58 +01:00
rdb
78bf339c41
Fix material shader inputs not being updated properly
2016-11-27 14:24:37 +01:00
rdb
cf389276da
Backport b02e352 to 1.9:
...
rdb: Fix wrong GL texture being bound to image slot after being recreated
2016-11-27 13:04:54 +01:00
rdb
b02e3521bc
Fix wrong GL texture being bound to image slot after being recreated
2016-11-27 12:30:37 +01:00
rdb
d3008c56e0
Merge branch 'input-overhaul' of github.com:grimfang/panda3d into input-overhaul
2016-11-22 12:15:37 +01:00
rdb
d0e9f136c0
Merge branch 'master' into input-overhaul
2016-11-22 12:15:21 +01:00
rdb
8c1f64e086
Fix for 1.9: fix errors when Cg-style matrix inputs are mat3
2016-11-14 19:41:54 +01:00
rdb
7259425b7c
Let's do away with Geom-wide usage hints, it's not very useful
2016-11-03 11:34:10 +01:00
rdb
7bef96e71d
Don't give misleading error when image shader input is missing
2016-11-03 11:11:02 +01:00
rdb
29411f5e14
Merge remote-tracking branch 'origin/release/1.9.x'
2016-10-31 22:32:39 +01:00
rdb
4526de8f7a
Fix exception when trying to pickle NodePathCollection objects
2016-10-31 22:07:01 +01:00
rdb
ed761f2997
Fix build without Python
2016-10-31 20:14:48 +01:00
Mitchell Stokes
59b0913b0b
Cleanup .gitignore files
...
Remove all .gitignore files in subdirectories and add a few new ignores
to the top-level directory .gitignore file.
2016-10-30 20:06:12 -07:00
Mitchell Stokes
81dd4d97ad
Implement make_copy() for BulletRigidBodyNode
...
This appears to be the last piece needed to load BulletRigidBodyNodes from BAM files.
2016-10-27 13:56:02 +02:00
rdb
1049088f11
Clean up some of the dtool_config.h variables
2016-10-24 22:10:46 +02:00
rdb
ef986ccfc0
Texture.set_ram_image(_as) now directly accepts buffers with right component size
2016-10-24 21:29:43 +02:00
rdb
a757cb47e8
Add tube-into-plane and tube-into-sphere tests
2016-10-24 17:34:55 +02:00
rdb
df998fb24c
bam2egg: support collision masks, UvScrollNode
2016-10-24 17:20:21 +02:00
David Rose
775c69b53d
PfmFile::set_point() should allow NaN's
2016-10-23 19:14:39 -07:00
rdb
62c008602e
Merge branch 'release/1.9.x'
2016-10-20 11:14:37 +02:00
rdb
ea82d9d664
Preserve "intangible" and "level" collide flags in bam2egg
2016-10-20 11:02:19 +02:00
rdb
e2fe951322
Fix compilation errors in Bullet 2.84/2.85
2016-10-16 00:14:05 +02:00
rdb
33c309d78f
Make stb_image loader not rely on seeking to read .jpg files
2016-10-13 00:27:17 +02:00
rdb
f1f4951fb5
Merge remote-tracking branch 'origin/release/1.9.x'
2016-10-13 00:25:57 +02:00
rdb
7c45e891f5
X11: fix .ico cursor bug. Support PNG-compressed .ico files.
2016-10-13 00:16:40 +02:00
rdb
4381412d23
Merge branch 'release/1.9.x'
2016-09-28 00:14:21 +02:00
rdb
3f53994372
Fix mipmap filtering issues in tinydisplay renderer
2016-09-28 00:00:22 +02:00
rdb
2e9394eba7
Fix tinydisplay texture errors on shutdown
2016-09-27 22:38:03 +02:00
rdb
3ee033eeeb
Write texture types when pview failed to recognise extension
2016-09-27 21:33:11 +02:00
rdb
c9ea02445e
Fix state attribs at primitive level in bam2egg; also prevent duplication of state attribs at primitive level if possible
2016-09-18 11:31:04 +02:00
rdb
7c79a999a5
Fix optimize=4 build on Windows; adjust Travis to make one opt4 build
2016-09-16 12:58:27 +02:00
rdb
3eed7bc042
Fix compilation issue for gcc versions before 4.3
2016-09-16 00:54:00 +02:00
rdb
0bdafe45ce
Fix various issues in bam2egg:
...
* No longer inserts an extra root group for the ModelRoot
* Support depth test, offset and cull bin attributes
* Preserve non-GeomNodes under Character
* Render attributes are applied on group level if possible
2016-09-14 21:54:35 +02:00
rdb
08ea4bf2e5
Merge branch 'release/1.9.x'
2016-09-14 20:57:26 +02:00
rdb
2c651dc96b
Fix is_playing() when playing an animation backwards
2016-09-14 20:55:57 +02:00
rdb
9904980ce4
Fix async flatten of node without parents
2016-09-14 17:29:53 +02:00
deflected
234e7eefee
loader: Added loading of 2D texture array
...
Signed-off-by: deflected <deflected@users.noreply.github.com>
2016-09-12 13:21:23 +03:00
rdb
70f10a70d1
Merge branch 'release/1.9.x'
2016-09-12 00:48:03 +02:00
rdb
632ad5e3ef
Acquire mutex in cache_unref() - fixes race cond in async flatten
2016-09-12 00:36:36 +02:00
rdb
a0b2a98178
Fix crash that happens when using OdeTriMeshData incorrectly
2016-09-11 12:23:28 +02:00
rdb
558f84a95f
Backport normalized() method to 1.9 branch
2016-09-08 22:53:36 +02:00
rdb
dc29ac8d34
Merge remote-tracking branch 'origin/release/1.9.x'
2016-09-08 22:31:04 +02:00
rdb
4d8a9aa3a1
Fix automerge failure
2016-09-08 22:27:25 +02:00
rdb
61b7af74db
Merge branch 'release/1.9.x'
2016-09-08 22:18:50 +02:00
rdb
206d361f49
Support for CollisionBox, InvSphere and Tube in bam2egg
2016-09-08 22:14:44 +02:00
deflected
abb6ee0542
gobj: Fixed wrong texture pool key for 2D texture arrays
...
- 2D texture arrays are added to internal storage with
specific unique name, so keep it as texture pool key
instead of filename.
2016-09-08 20:36:02 +02:00
David Rose
05d74624ee
Merge branch 'master' of https://github.com/panda3d/panda3d
2016-08-29 16:44:05 -07:00
David Rose
fb6637ddac
expand PfmFile::merge() to support other than 3 channels, and not to fuss about NaN's in the result
2016-08-29 16:43:13 -07:00
rdb
a9345ad633
Fix bug: bam2egg ignores non-GeomNodes directly under Character node
...
This result in some animated models only properly exporting the skeleton without geometry if the geometry is under non-GeomNodes.
Fixes LP https://bugs.launchpad.net/panda3d/+bug/1617834
2016-08-29 02:09:03 +02:00
fireclawthefox
2da890800f
Fix hat mapping if dpad emulation is deactivated
2016-08-11 12:05:07 +02:00
fireclawthefox
719e77a191
Changed button mapping
...
changed mapping of previous and next (i.e. wiimote's + and - keys) to
the same as the select and start button
2016-08-10 16:46:20 +02:00
fireclawthefox
f1444fcff9
Fixed << operator to be usable in .I file
2016-08-10 16:44:09 +02:00
fireclawthefox
3227fe2ebd
Fixed and enabled logging for some functions
...
Added missing include
uncomment logging in find- and get_control as well as find- and
get_button functions
2016-08-10 14:02:37 +02:00
rdb
20353f33eb
Fix missed switch cases for 1d texture arrays
2016-08-09 01:47:44 +02:00
fireclawthefox
e1661111c2
Exposed AnalogState and ButtonState
...
Published Analog- and ButtonState to be accessible from python
Added functions to find Controls and buttons to simplify access
Refactored highscore search for setting the device class
2016-08-04 22:52:01 +02:00
fireclawthefox
670efb9e64
Extended device class heuristics
...
Extended and partly restructured the way how the device class gets set
Added DC_COUNT to the DeviceClass enum to simplify loop checks
2016-08-03 20:20:01 +02:00
rdb
1d2e17932c
Don't require spaces around : in #extension directive
2016-07-30 12:59:42 +02:00
fireclawthefox
271997b462
Moved get_devices functions into PUBLISHED section
2016-07-22 21:25:27 +02:00
fireclawthefox
ef7cc925c4
Add data graph node for devices
...
Add the new inputDeviceNode class to be used in the data graph
Add config variable for low batery level
2016-07-21 23:09:09 +02:00
fireclawthefox
a6110a606e
renamed gamepad to device in inputDeviceManager
...
renamed as not every device is a gamepad
2016-07-21 12:46:20 +02:00
fireclawthefox
dcdbe4b339
Add handling for new gamepad buttons
...
Added handles to 1, 2, next and previous as available on the wiimote
2016-07-21 12:44:44 +02:00
rdb
47f999fdec
Improve GLSL preprocessor; support GL_GOOGLE_include_directive
2016-07-20 16:00:34 +02:00
rdb
2eba4dea9b
Change handling of unsupported render mode so that behaviour can be shared among renderers
2016-07-20 15:59:42 +02:00
rdb
82b7728683
Merge remote-tracking branch 'origin/release/1.9.x'
2016-07-20 14:32:34 +02:00
rdb
47388b0dbc
Separate out CPython calls from core libs; eliminate need for pystub
2016-07-20 14:30:41 +02:00
rdb
339eb58007
Fix compile error on some Mac versions
2016-07-20 11:45:14 +02:00
rdb
400bc2cc26
Support .ktx textures, ETC1/ETC2/EAC compression
2016-07-15 11:50:57 +02:00
rdb
8381118a97
Assorted tweaks and compile warning fixes
2016-07-14 12:54:39 +02:00
rdb
106cf2cad0
Fix randomly slanted/crashing TextGraphics
2016-07-12 19:31:23 +02:00
rdb
6f168446d0
Merge branch 'release/1.9.x'
2016-07-12 14:57:48 +02:00
rdb
7b7bf93118
Fix frame chug when loading big model asynchronously (LP #1019599 )
2016-07-12 11:27:52 +02:00
rdb
f94db0661e
Add move semantics to CDLockedReader/CDWriter
2016-07-10 17:22:34 +02:00
rdb
8b67ab31f5
Fix obscure compile error
2016-07-10 16:49:00 +02:00
rdb
bfe7a7b1d3
Merge from 1.9, cleanup DX9/shader, fix built-in shadow mapping in DX9
2016-07-10 16:44:09 +02:00
rdb
e098da9030
Support uint8 indices in DX9 renderer
2016-07-10 15:48:17 +02:00
rdb
c34758ea5c
Cg fixes for DX9
2016-07-10 14:31:58 +02:00
rdb
fa7730819f
Fix assertion when using aux render targets in DX9
2016-07-10 14:05:29 +02:00
rdb
f7fde882b8
Fix uninitialised variable
2016-07-10 12:25:35 +02:00
rdb
85386049f0
Merge branch 'release/1.9.x'
2016-07-09 15:39:07 +02:00
rdb
44d59edc30
Fix cube map render and rendering the same camera with two GSGs
...
The problem was that the cull result was being reused across different lens indices and GSGs
2016-07-09 14:42:25 +02:00
rdb
11861cb73d
Backport shadow-depth-bits config var to 1.9
2016-07-09 14:27:33 +02:00
rdb
47d1b4e220
PythonTask: don't crash if repr(owner) errors, deal better with bad owners
2016-07-09 10:02:55 +02:00
rdb
fd8dd360b2
Fix compile error statically linking build with DX9
2016-07-09 09:59:51 +02:00
rdb
f35a7612e5
Fix interrogate error with PhysX
2016-07-03 09:20:55 +02:00
rdb
a906f34eee
M_alpha now no longer squares the alpha component it writes to the framebuffer.
...
To re-enable the old behaviour, set old-alpha-blend in Config.prc.
2016-06-28 22:13:33 +02:00
rdb
1b33fec978
Remove assertion when reregistering the same AudioManager constructor
2016-06-28 21:35:53 +02:00
rdb
54819dbcde
Fix crash when using TextGraphic in texts
2016-06-28 19:11:58 +02:00
rdb
c7dbf193f1
Fix Linux crash with Xbox One controller, fix compile warnings
2016-06-28 17:49:47 +02:00
rdb
365e1d53ef
Merge branch 'release/1.9.x'
...
Conflicts:
makepanda/makepandacore.py
panda/src/cocoadisplay/cocoaGraphicsStateGuardian.mm
2016-06-27 01:18:02 +02:00
rdb
7dfd907e17
Try to report red/green/blue bits for Cocoa windows
2016-06-27 00:38:14 +02:00
Sam Edwards
2933b8ed39
general: Fix missing includes.
2016-06-25 19:10:38 -07:00
rdb
fd16e34660
Fix Xbox One controller on Windows, add untested support for flight sticks and steering wheels
2016-06-24 13:32:10 +02:00
rdb
01e57e1bdd
Emulate d-pad from hat axes, fixes Xbox One d-pad buttons on Linux
2016-06-24 10:54:57 +02:00
rdb
b98d3c06ee
Merge branch 'master' into input-overhaul
2016-06-24 10:51:41 +02:00
rdb
9963fe2c3c
Fix a couple of compile warnings, reduce unnecessary includes
2016-06-23 22:59:50 +02:00
rdb
7266f5ae68
Fix race condition when multiple threads write to MultiplexStream simultaneously
2016-06-23 22:56:18 +02:00
rdb
9b5ff08011
Fix crash loading null audio manager
2016-06-23 22:27:34 +02:00
rdb
6728e5ecbe
Merge remote-tracking branch 'origin/release/1.9.x'
2016-06-23 16:14:18 +02:00
rdb
fede8b8d69
Fix compile issue on Mac OS X
2016-06-22 22:24:33 +02:00
rdb
7676104f4c
Fix error compiling with pre-C++11 compilers
2016-06-22 19:19:00 +02:00
rdb
7e08b87ff7
IPv6 support, improve URL handling/comparison
2016-06-22 17:57:40 +02:00
rdb
bf26cecb32
Fix some compile warnings
2016-06-22 13:44:16 +02:00
rdb
1974b3e692
Fix deadlock waiting for Python task to end at end of program
2016-06-12 12:04:03 +02:00
rdb
89deb71538
Fix regression loading nurbs surface/curve and patches from .egg
2016-06-11 23:24:06 +02:00
rdb
4283a63a7d
Merge branch 'release/1.9.x'
2016-06-11 01:29:14 +02:00
rdb
12873c0d7e
Fix wxPython and tkinter issues on Mac OS X
2016-06-10 02:02:36 +02:00
rdb
7d6b7f40f5
Merge branch 'release/1.9.x'
2016-06-09 21:52:51 +02:00
rdb
0a731d0545
Improve performance of texture load/store
2016-06-09 21:49:26 +02:00
rdb
a1749b2f07
Don't align transform_blend vertex column to 4 byte boundary
...
Somewhat improves performance of CPU vertex animation
2016-06-09 21:48:57 +02:00
rdb
b303962e96
Disable cycle detection in tasks for now, it is way too unstable
2016-06-09 16:48:31 +02:00
rdb
e9c76328fb
Fix a crash in PythonTask destructor
2016-06-08 13:18:31 +02:00
rdb
5675e0de56
Merge branch 'release/1.9.x'
2016-06-07 22:08:00 +02:00
rdb
2d6e817d1d
Fix reading multifiles that were built with -F option
2016-06-07 22:04:34 +02:00
rdb
d53b2ca80e
Backport various bugfixes from master, among which:
...
- Fix Windows pbuffer crash on Intel cards
- Fix crash when using pnmimage.write with unsupported format
- Fix GLSL diagnostics on Mesa GLES2 compiler
- Reduce warning severity when resizing immutable storage texture
- Print more debug info when FrameBufferProperties are insufficient
- Fix "Bam file contains objects of unknown type: MovingPart<LMatrix4f>"
- Fix memory leak in BulletTriangleMesh
- Fix pmerge in Python 3
2016-06-07 14:40:27 +02:00
rdb
8d05ef3022
Assorted fixes
2016-06-03 22:23:42 +02:00
rdb
679bf0a554
Implement tellg() on ZStream, make multify -t work with .pz/.gz compressed multifiles
2016-06-03 16:12:37 +02:00
rdb
5543716660
Interrogate wraps vector<unsigned char> as Python 3 bytes object
2016-06-03 01:47:54 +02:00
rdb
b486de2700
Fix rare mutex error at shutdown: "MutexPosixImpl::acquire(): Assertion `result == 0' failed."
2016-05-29 02:03:36 +02:00
rdb
18874fa151
Replace PN_int/uint types with stdint.h types, since all compilers we support have them.
...
Plus, we already had code that relied on them being available anyway.
2016-05-11 00:27:58 +02:00
rdb
ce29ae490d
Interrogate improvements, more properties, MAKE_SEQ_PROPERTY
2016-05-11 00:16:53 +02:00
rdb
fb78fe6e2a
Interrogate enum class support (maps to Python 3.4 enums), sanify wrapper code
2016-05-07 00:45:26 +02:00
wolfgangp
cf11d46e26
Replace BulletSoftBodyMaterial camelCase methods
2016-05-06 02:50:53 +02:00
rdb
a898911a5c
Compile fixes for older OpenEXR versions
2016-05-03 19:19:17 +02:00
wolfgangp
821e625c4f
Remove obsolete property heightfield_tex
2016-05-03 14:57:25 +02:00
David Rose
0b224a320a
Merge branch 'master' of https://github.com/panda3d/panda3d
2016-05-02 15:05:25 -07:00
David Rose
403dd39934
add support for OpenEXR floating-point image files
2016-05-02 14:44:53 -07:00
rdb
910a50de16
Fix crash when using pnmimage.write with unsupported format, also fix a minor issue in shader.set_filename
2016-05-02 16:43:43 +02:00
rdb
d3172015d5
Allow setting custom filename on shader, fix diagnostics for Mesa GLES2
2016-05-01 22:53:20 +02:00
tobspr
b2ebd78d81
Support for R16I and R16UI
2016-04-30 12:26:59 +02:00
tobspr
dac2bfc7b9
Support for setting a heightfield handle directly on the ShaderTerrainMesh
2016-04-30 09:32:09 +02:00
rdb
288452a861
Changes to help with static build, allow linking OpenAL statically
2016-04-29 19:54:24 +02:00
rdb
369df86096
Fix a compile issue or two
2016-04-29 19:17:47 +02:00
rdb
dc09e28ed9
Also accept a .gz wherever a .pz file is accepted
2016-04-29 16:54:25 +02:00
rdb
a2ae62dbda
Introduce ability to write older .bam versions, down to 6.21
...
See https://www.panda3d.org/manual/index.php/Dev:Bam_Format
2016-04-29 16:30:41 +02:00
David Rose
063f9bbc4d
minor compilation issues
2016-04-28 16:14:44 -07:00
rdb
723c1de520
Fix various emscripten compile issues
2016-04-28 21:15:46 +02:00
rdb
6b83261ea4
Implement stb_image, support loading HDR, PSD, GIF images
2016-04-28 17:10:44 +02:00
rdb
6f8fd916f3
Allow seeking a ZStream back to 0 (but no other location)
2016-04-28 17:03:31 +02:00
rdb
1c6f4c29c4
Add support for native FLAC reading
2016-04-28 12:05:10 +02:00
tobspr
0c16baa707
Reduce warning severity when resizing texture with immutable stirage
2016-04-25 12:03:15 +02:00
rdb
ee595ae880
fast path optimizations for get_ram_image_as
2016-04-24 02:42:12 +02:00
rdb
2c6a6c9f06
Display deprecation warning when writing FFT compressed anim chans
2016-04-24 01:44:09 +02:00
rdb
07d06d434c
Print more debug info when FrameBufferProperties are not sufficient
2016-04-23 18:06:18 +02:00
rdb
2c1cb4c313
Compile fixes for latest VRPN and TIFF
2016-04-22 17:18:27 +02:00
deflected
bffe3bf55a
bullet: Plug memory leaks
...
Signed-off-by: deflected <deflected@github>
2016-04-21 21:34:55 +03:00
rdb
ad04a4b026
Fix: Bam file contains objects of unknown type: MovingPart<LMatrix4f>
...
Restores ability to read old .bam files containing animation data
2016-04-21 11:28:00 +02:00
rdb
6225755230
Support rendering without any vertex arrays bound better
2016-04-21 01:32:13 +02:00
rdb
40acfeffb5
Punish soft framebuffer configs if we're not asking for one
2016-04-21 00:18:08 +02:00
rdb
32bc7cd819
Changes to allow compiling Panda with MSVC 2015
2016-04-19 15:43:02 +02:00
rdb
32b4273c94
bullet: fix issue with result of get_contact() going out of scope
2016-04-18 23:57:02 +02:00
rdb
320f341467
Fix pbuffer crash on Windows with old Intel drivers
2016-04-18 23:26:12 +02:00
rdb
380ff44710
Workaround for older versions of the DirectX SDK
2016-04-17 20:45:24 +02:00
rdb
d3071d1e50
Use a bitmask for storing clear-active flags
2016-04-16 14:19:54 +02:00
rdb
2b7ef9c787
Add SphereLight class
2016-04-16 12:30:07 +02:00
rdb
f06f184850
Prefer core/ARB version of FBOs instead of EXT version
2016-04-14 21:02:35 +02:00
rdb
e4b032ea21
Fix crash reading Camera objects from pre-6.41 bam files
2016-04-12 20:47:11 +02:00
rdb
5a2a9a3020
Merge branch 'release/1.9.x'
2016-04-12 20:46:32 +02:00
rdb
82fdb30957
Fix incorrect format selection for renderbuffers (missing alpha channel)
2016-04-12 20:44:07 +02:00
rdb
873fd3294a
Work around bug in certain Intel drivers with #pragma include
2016-04-12 18:20:27 +02:00
wolfgangp
4821b69ec1
Match ShaderTerrainMesh triangulation scheme with Bullet's
2016-04-11 22:01:13 +02:00
rdb
7addf3e12b
Merge pull request #80 from tobspr/master
...
Add new terrain implementation (ShaderTerrainMesh)
2016-04-11 18:35:11 +02:00
tobspr
5f28d20402
Change uniform warning in glShaderContext to avoid spam
...
This changes the severity of the uniform warning to debug, to avoid spamming the console
2016-04-10 10:59:30 +02:00
rdb
33ed30b178
Support defining bam factory functions in Python
2016-04-09 19:28:33 +02:00
rdb
7e04042ca4
Update gl2ext.h
2016-04-09 19:18:34 +02:00
rdb
64cb1c520e
Fix ColorBlendAttrib bam write, add properties to most *Attrib
2016-04-09 19:10:52 +02:00
rdb
f0cd1ce315
ColorBlendAttrib: support separate alpha mode and dual-src blend. bam 6.42
2016-04-08 15:44:57 +02:00
rdb
e73a89705b
Improve OpenGL ES support, add OpenGL ES 3 support
2016-04-04 17:00:27 +02:00
rdb
6ddfb0ace3
Support line/point thickness in bam2egg
2016-04-04 12:48:48 +02:00
rdb
15b0ba45f9
Fix broken pickling in Python 3 build
2016-03-31 16:49:27 +02:00
rdb
a3a42874f3
Merge remote-tracking branch 'origin/master' into input-overhaul
2016-03-29 12:28:53 +02:00
rdb
245d1241c9
Restore assign() for vector classes
2016-03-28 22:36:31 +02:00
rdb
82ab126ea7
Add support for glLogicOp via LogicOpAttrib / NodePath::set_logic_op
2016-03-25 17:33:30 +01:00
rdb
ba4c38112c
Merge remote-tracking branch 'origin/release/1.9.x'
2016-03-25 17:22:00 +01:00
rdb
2b034506fa
Backport fixes for Arch compile issues to 1.9
2016-03-25 01:40:00 +01:00
rdb
a9c5525dd6
Compile fix for Ubuntu precise version of ffmpeg
2016-03-25 00:45:12 +01:00
rdb
ce947adf8f
Replace uses of "delete" with "delete[]" where appropriate
2016-03-24 23:56:12 +01:00
rdb
63dd1e0d2b
Fixes for ffmpeg 3.0
2016-03-24 22:24:16 +01:00
rdb
2abad9649b
Remove X11-specific stuff from egldisplay, instead using x11display as common base
2016-03-19 18:46:10 +01:00
rdb
1cc79633c1
Merge branch 'master' into input-overhaul
...
Conflicts:
panda/src/device/buttonNode.cxx
panda/src/device/clientAnalogDevice.I
panda/src/device/clientAnalogDevice.cxx
panda/src/device/clientButtonDevice.I
panda/src/device/clientButtonDevice.cxx
panda/src/device/clientDevice.I
panda/src/device/clientDevice.cxx
panda/src/device/clientDevice.h
panda/src/device/clientTrackerDevice.I
panda/src/device/trackerNode.I
panda/src/device/trackerNode.h
panda/src/display/callbackGraphicsWindow.cxx
panda/src/display/graphicsWindow.cxx
panda/src/display/graphicsWindowInputDevice.I
panda/src/display/graphicsWindowInputDevice.cxx
panda/src/display/graphicsWindowInputDevice.h
panda/src/tinydisplay/tinyOsxGraphicsWindow.mm
panda/src/tinydisplay/tinyXGraphicsWindow.cxx
panda/src/windisplay/winGraphicsWindow.cxx
panda/src/windisplay/winGraphicsWindow.h
panda/src/x11display/x11GraphicsWindow.cxx
2016-03-19 14:54:56 +01:00
rdb
bd1df2b9ad
Merge remote-tracking branch 'origin/release/1.9.x'
...
Conflicts:
panda/src/pipeline/pipeline.cxx
2016-03-18 16:47:17 +01:00
tobspr
3e2b8407c8
Add more properties to the Texture class
2016-03-18 16:41:16 +01:00
rdb
cccd29cc61
Fix use of uninitialized variable pointed out by valgrind
2016-03-17 21:39:42 +01:00
rdb
f68bfab7a9
Add light.shadow_caster and light.shadow_buffer_size
2016-03-17 15:26:12 +01:00
rdb
4ace5b5bc9
Fix compilation issues
2016-03-16 14:04:15 +01:00
wolfgangp
01932c9e79
Squashed commit of the following: ( closes #85 )
...
commit cff663ad0e23ed73057201fc0c71f12de82be201
Author: wolfgangp <wolfgangpratl@gmail.com>
Date: Thu Mar 10 10:48:39 2016 +0100
Make get_normal_world_on_b return a vector.
commit 6fe5f5a24d615dc05b532c07486e23123e4cc9f2
Author: wolfgangp <wolfgangpratl@gmail.com>
Date: Thu Mar 3 00:30:01 2016 +0100
Remove comments.
commit f94f0ebd1acde2c3c32ffdaadd24deb4d16d1a84
Author: wolfgangp <wolfgangpratl@gmail.com>
Date: Wed Mar 2 23:53:05 2016 +0100
Revert header author change.
commit d50c41b830034e2dc015298cd4596b6292d582ac
Author: wolfgangp <wolfgangpratl@gmail.com>
Date: Wed Mar 2 23:38:45 2016 +0100
Fix indentation and spaces.
commit 792eab5fe1ca77564a36d7ab43b8996e03432dbd
Author: wolfgangp <wolfgangpratl@gmail.com>
Date: Wed Mar 2 20:11:43 2016 +0100
Revert changed date.
commit 99f78d4a90d43cf3cc5e5168c319020b307cdbd0
Author: wolfgangp <wolfgangpratl@gmail.com>
Date: Wed Mar 2 19:01:39 2016 +0100
Fix bulletHeightfieldShape to support non-square images. Add alternative constructor taking a Texture input, intended for use with ShaderTerrainMesh.
2016-03-16 10:43:13 +01:00
rdb
2ee977dd3e
Fix PhysX compile error
2016-03-16 10:32:47 +01:00
Sam Edwards
6b8f78c9e0
general: Fix missing includes.
2016-03-15 18:30:24 -07:00
Sam Edwards
f0bed9ab1c
pnmtext: Remove unused local.
2016-03-15 18:30:24 -07:00
rdb
5cfe2b89e7
Support getting FBO attachment with only 8 red bits
2016-03-12 21:05:16 +01:00
rdb
46562b700d
Support FBOs without any attachments
2016-03-12 20:42:27 +01:00
tobspr
37aaa49529
Change message emitted by nvidia driver workaround to info
2016-03-03 13:56:07 +01:00
rdb
2bf886fc5b
Add premultiplied alpha mode, for convenience
2016-03-02 17:55:34 +01:00
rdb
2971915618
Bam 6.41: lenses and light changes, add max_distance
2016-03-02 17:54:49 +01:00
rdb
711c97ad6d
A few glgsg fixes from tobspr
2016-03-02 16:24:38 +01:00
rdb
d50a326ca7
Fix silly multiple uncompress&recompress when generating mips for compressed texture
2016-02-29 19:49:48 +01:00
rdb
f933eb4e96
Fix compile warnings (incl. "Attempt to define invalid type" spam), define _Dtool_CheckErrorOccurred in release builds for binary compat
2016-02-27 16:45:22 +01:00
rdb
9f0cd81803
Make OpenGL performance warnings "info", not "warning" category
2016-02-27 12:03:29 +01:00
tobspr
d9ec4d402a
Add print-pipe-types prc variable to prevent pipe output
2016-02-23 18:46:34 +01:00
David Rose
f30628bde6
Merge branch 'master' of https://github.com/panda3d/panda3d
2016-02-22 16:02:52 -08:00
David Rose
2ad07ac1fb
fix PfmFile::xform() for files with other than 3 channels
2016-02-22 16:02:38 -08:00
rdb
656ccfcafb
Merge branch 'release/1.9.x'
2016-02-22 19:48:21 +01:00
rdb
844a284925
Fix mipmap level count calculation for texture arrays
2016-02-22 19:47:08 +01:00
tobspr
1795a7c8dd
Work arround timestamp precision in ramdisks
...
This fixes the timestamp precision when mounting RamDisks, by ensuring that the modified timestamp is always greater than the original timestamp.
2016-02-20 19:55:49 +01:00
tobspr
aa4a73af7d
Support for imageCubeArray, remove _EXT suffix
...
This PR adds support for the imageCubeArray GLSL type (GL_IMAGE_CUBE_MAP_ARRAY).
Also, the _EXT suffix is removed from the GL_IMAGE types.
2016-02-20 19:11:23 +01:00
tobspr
84f5baaf2c
Add ShaderTerrainMesh sample
2016-02-20 14:05:50 +01:00
David Rose
0385da0f44
add PfmFile::indirect_1d_lookup()
2016-02-19 18:11:57 -08:00
tobspr
da29c7eea4
Add new terrain implementation (ShaderTerrainMesh)
2016-02-18 20:51:14 +01:00
tobspr
1c9985d2f7
Add bilinear filtering to TexturePeeker
2016-02-18 20:46:45 +01:00
tobspr
862f0e4db2
Add more formats to TexturePeeker, emit error if format is not supported
2016-02-18 18:39:18 +01:00
tobspr
0fcfb8e372
New file headers, new comment style
2016-02-17 17:47:48 +01:00
rdb
186f1b41b2
Fix for PDWORD_PTR
2016-02-16 11:24:42 +01:00
tobspr
1f32c1dff0
Fix typo in glGraphicsStateGuardian
2016-02-13 16:36:07 +01:00
rdb
6689e69822
Merge branch 'master' into input-overhaul
2016-02-13 11:21:20 +01:00
rdb
591ce04ab1
Work around black text issue in OpenGL ES 2 renderer
2016-02-11 19:12:52 +01:00
tobspr
8dfef99915
Fix swizzle masks on vector types
2016-02-07 19:45:01 +01:00
rdb
40739c6b5f
Fix link issues and crashes with Android build
2016-02-06 11:46:56 +01:00
rdb
30fc995a2d
Fix OpenGL ES luminance formats (which aren't deprecated in GLES)
2016-02-03 14:07:59 +01:00
rdb
98a86bf43a
Merge branch 'release/1.9.x'
2016-02-03 13:39:14 +01:00
rdb
ef623aa0e2
pview should use clamp wrap mode when loading image as model
2016-02-03 13:37:23 +01:00
rdb
623d81db6b
Support various kinds of BMP headers (incl reading bmp with alpha)
2016-02-03 13:36:38 +01:00
rdb
090e912ce6
Cleanup of comments and whitespace
2016-02-01 22:30:43 +01:00
rdb
ffac45ce2b
Fix OpenGL ES compilation
2016-01-28 13:54:54 +01:00
rdb
17ad8f254d
Support BC4/BC5 compression, more texture formats, DX10 DDS files, rgba16/32 DDS files
2016-01-28 13:16:53 +01:00
rdb
c855049f24
Fix glstuff compilation error
2016-01-27 17:14:32 +01:00
rdb
0a366e987f
Merge branch 'release/1.9.x'
...
Conflicts:
panda/src/glstuff/glGraphicsStateGuardian_src.cxx
panda/src/putil/bamReader.h
2016-01-26 11:45:04 +01:00
rdb
375baaaabd
Fix constant reloading of texture when using gl-ignore-mipmaps
2016-01-26 11:39:50 +01:00
rdb
d574dd4b0b
Fix texture format selection in FrameBufferProperties
2016-01-26 11:39:19 +01:00
rdb
ea368dd559
Bam reader robustness; allow threaded bam reading from Python
2016-01-26 11:35:04 +01:00
rdb
47de3542f6
Apply tobspr's texture memory calculation fixes to 1.9 branch
2016-01-26 11:15:22 +01:00
tobspr
8d6ad30c07
Fix reported memory usage when using immutable texture storage storage
2016-01-20 19:33:16 +01:00
tobspr
570d630316
Use r11_g11_b10 in the FrameBufferProperties
2016-01-20 18:55:25 +01:00
rdb
bb85b261f8
Expose more properties to Python
...
Rename "from" to "from_solid" to avoid clashing with Python keyword
2016-01-13 21:29:34 +01:00
rdb
6eb460c359
Add ability to cache compiled GLSL shaders, remove unused ShaderUtilization
2016-01-13 19:58:11 +01:00
David Rose
bc58335214
Merge branch 'master' of https://github.com/panda3d/panda3d
2016-01-11 13:27:24 -08:00
David Rose
ea07322b1d
PNMImage::indirect_1d_lookup()
2016-01-11 13:27:18 -08:00