Commit Graph

9875 Commits

Author SHA1 Message Date
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
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
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