21802 Commits

Author SHA1 Message Date
rdb
47c7ff42cc CommonFilters: better handle failure condition when shaders not supported 2018-01-05 14:15:22 +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
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
4f50f6abd0 showbase: use ShowBaseGlobal module as alternative to builtin scope
Allows accessing `base` object and several other builtins from the ShowBaseGlobal module.

It doesn't bother with builtins that are available as members of the base object such as `render` and `loader`.

Fixes #182
2018-01-03 14:25:27 +01:00
rdb
9065f2e16e installpanda: add --verbose flag 2018-01-03 14:09:15 +01:00
rdb
d3249356b3 Merge remote-tracking branch 'origin/release/1.9.x' 2018-01-03 14:07:42 +01:00
rdb
ad58d5161f installpanda: set proper permissions on includes/man pages
Fixes: #159
2018-01-03 13:48:08 +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
f37c070c7c tests: cleanup GraphicsEngine to prevent shutdown freeze on windows
This occurs with the multithreaded render pipeline.  It's not an issue when using ShowBase because ShowBase also explicitly calls this during shutdown.
2018-01-03 00:07:50 +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
97eb734765 tests: add test cases for GLSL shaders 2017-12-24 20:46:53 +01:00
rdb
2f910ccd7c tests: fixes for the window tests 2017-12-24 20:34:06 +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
ed5e5386b9 AsyncFuture improvements, incl. support for gathering futures 2017-12-21 14:07:01 +01:00
rdb
c1fb44ad69 makewheel: fix binary data being doubled 2017-12-21 11:39:19 +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
6faaabe034 makepanda: fix build error with maya2008 on macOS 2017-12-19 23:37:36 +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
sean5470
9e8060d402 Moved MAX plugin line to MAX instead of Maya section
Moved the search line for .ms files from the Maya section, to the MAX section where it should be.

Closes: #214
2017-12-16 21:05:57 +01:00
rdb
29f50be15e Fix bug: copy-to-ram depth texture binding gets format set to RGB
This was a regression introduced by be8f4de33789cbb96551bb34b1ba85e7134d1e73

Fixes: #212
2017-12-16 21:03:08 +01:00
deflected
e4a817b469 Loader: Fixed crash when canceling async loading of model
- Clean up the _loader after we clean up the requests,
        not before that

Signed-off-by: deflected <deflected@users.noreply.github.com>
2017-12-13 13:42:29 +02: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
18678214ae interrogate: pass "args" tuple to function that takes PyObject *args 2017-12-12 16:20:59 +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
deflected
bdd53d60fc ShowBase: Fixed crash when want-render2dp is False
- Fixed crash in ShowBase when want-render2dp setting
        is set to 0(False).

Signed-off-by: deflected <deflected@users.noreply.github.com>
2017-12-04 22:46:30 +01:00
deflected
7a46b2ca60 ShowBase: Minor fixes over aspect ratio and size calculations
- Do not take into accound SBS if it is not enabled
        - Always return value for getSize()
        - Properly handle SBS for window-events
        - Redo positioning of aspect2d(p) markers exactly as
        they are created when adjusting aspect ratio

Signed-off-by: deflected <deflected@users.noreply.github.com>
2017-12-04 22:46:22 +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
rdb
f54b8be676 Separate out Python compat hacks from py_panda.h into py_compat.h 2017-12-03 15:48:02 +01:00
Younguk Kim
3abf3a0c88 Add HAVE_PYTHON macro to build without python 2017-11-28 13:04:57 +09:00
rdb
27f20c80fd Don't include dlmalloc_src.cxx in interrogate
Fixes: #200
2017-11-27 18:49:28 +01:00