Commit Graph

22 Commits

Author SHA1 Message Date
rdb 8f9d0ab6f6 pgraph: fix some TextureAttrib state cache issues
The _render_stages and _render_ff_stages cannot simply be copied, because they contain pointer references to the previous TextureAttrib.  Never copy them, and always mark _sort_seq as stale.

This fixes a test failure in replace_texture.
2019-08-13 18:08:48 +02: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
rdb f79fbf25c3 ShaderGenerator: big overhaul, don't generate more shaders than needed 2017-07-10 21:55:27 +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 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
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb 95d85819b0 Separate out sampler state from texture, support sampler objects, support LOD min/max/bias 2014-12-12 15:58:45 +01:00
David Rose 91e6231a3c apply per-attrib override to TexMatrixAttrib also 2010-05-06 01:12:34 +00:00
David Rose 9d62ca9f98 one override per TextureStage, instead of a global override per TextureAttrib 2010-05-04 22:39:40 +00:00
David Rose 24dea4e56a more fixes to RenderAttrib problem 2008-10-08 01:12:17 +00:00
David Rose fb9c56432a we are now using the modified BSD license 2008-05-28 18:37:20 +00:00
David Rose 3dd3c1aa44 oops, sorting texture stages in wrong direction by sort 2008-05-01 22:42:56 +00:00
David Rose 96e4739426 fix ff_tc_index some more 2008-04-16 00:30:50 +00:00
David Rose a667e91dce TextureAttrib::_implicit_sort 2008-04-10 00:45:43 +00:00
David Rose d52bd0616b fix dx8/dx9 texture coordinate issue 2008-02-21 21:56:47 +00:00
Josh Yelon 6f81e4850c Added support for shader-related TextureStage::Mode values 2007-10-09 19:25:08 +00:00
David Rose 4854ec070c remove 'deprecated' comments 2007-05-23 16:11:50 +00:00
David Rose c23792f1dc add polylight support to NodePath; prevent compiler warnings; minor style changes to polylightEffect to be consistent with panda conventions 2004-08-04 22:41:10 +00:00
David Rose 64aece121a robustify light interface further 2004-08-02 21:34:46 +00:00
David Rose c7c639797e merge multitexture support in from branch 2004-07-30 00:38:35 +00:00
David Rose 843c0331ae update license, change remaining local #includes to use quotation marks 2004-02-13 19:27:33 +00:00
David Rose a41e2cac34 premature checkin 2002-02-23 00:27:36 +00:00