loblao
68b7986557
NodePath: Implement replace_material
...
Closes #472
2018-12-09 19:05:25 +01:00
rdb
89236ac136
pgraph: fixed-depth billboards, bam additions (6.43)
...
This makes it possible to use BillboardEffect to specify a fixed distance to the camera, in order to keep them at a fixed apparent size.
This also enables serialization to .bam of the reference NodePaths of BillboardEffect and CompassEffect.
2018-12-06 23:52:58 +01:00
rdb
97d4e32a06
general: use nassert_raise instead of nassertv(false) et al
...
Even a brief error message in the assertion is infinitely more useful to a user who is not at home in the source code, especially for assertions that may reasonably be triggered by honest user mistakes.
2018-11-28 17:35:20 +01: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 0bb81a43c9e4fffb37cc2234c1b0fbae42020ceb. 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
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
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
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
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
854d736882
pgraph: fix alignment error in 32-bit Windows with Eigen
...
Fixes #251
2018-02-17 18:30:58 +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
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
82ab126ea7
Add support for glLogicOp via LogicOpAttrib / NodePath::set_logic_op
2016-03-25 17:33:30 +01:00
tobspr
0fcfb8e372
New file headers, new comment style
2016-02-17 17:47:48 +01:00
rdb
090e912ce6
Cleanup of comments and whitespace
2016-02-01 22:30:43 +01:00
rdb
41fad59ae8
bam 6.40: support writing NodePaths, allows instanced lights and clip planes
2016-01-11 15:04:06 +01:00
rdb
5406fab702
Merge branch 'release/1.9.x'
2015-12-24 16:18:22 +01:00
rdb
5f59f54475
set_render_mode_thickness/perspective no longer overwrites wireframe color
2015-12-19 23:44:23 +01:00
rdb
84c0fbd1b1
Remove deprecated empty-node-path behavior
2015-11-28 16:22:22 +01:00
rdb
75019784f4
Changes to inlining so we can use FORCE_INLINING in gcc as well
2015-07-27 15:39:46 +02:00
rdb
214d799d82
Add optional "other" NodePath argument for get_tight_bounds()
2015-07-06 14:52:08 +02:00
rdb
028c09add5
Implicit cast string to InternalName in c++, also optimize for string literals
2015-02-07 16:43:25 +01:00
rdb
78f8f65ef9
Add M_filled_wireframe render mode
2015-02-06 12:15:25 +01:00
rdb
7c14d1872a
Fix race condition when manipulating node transform in thread (LP #1417715 )
2015-02-04 00:06:14 +01:00
rdb
142bd6a021
Remove old MLightVector TexGen mode and FFP-based normal mapping
2015-01-22 12:26:22 +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
rdb
3fbdc43fbb
Fix compile errors with clang
2014-12-06 22:38:40 +01:00
rdb
cd79de19b2
Add more parameters for binding images to shaders.
2014-08-19 20:22:57 +00:00
rdb
03eddda4a2
Add more integer versions of set_shader_input
2014-07-04 17:34:49 +00:00
rdb
667b3a2729
Allow passing ints to set_shader_input
2014-07-04 12:16:35 +00:00
rdb
6e64ff951c
Add support for passing int arrays and vectors to GLSL shaders.
2014-07-03 21:54:45 +00:00
rdb
5f2c0a6e04
Big commit aiding in separation of Python bindings:
...
* Most extension functions have been moved to C++.
* In makepanda, Python bindings are compiled into panda3d/<module>.pyd.
2014-02-20 13:33:26 +00:00
David Rose
2c7d493513
NodePath::set_tex_projector(..., lens_index)
2012-02-14 02:40:51 +00:00
David Rose
39b32376bb
move a few more PStatCollectors out of local statics
2011-11-19 00:11:43 +00:00
David Rose
83b87652f8
fix prepare_scene() to prepare vertex buffers as well as textures
2011-11-05 17:58:28 +00:00
David Rose
134e9a9e92
dual names for interrogate
2011-10-11 00:45:51 +00:00
David Rose
501470169f
stdfloat_double
2011-10-10 05:25:10 +00:00
rdb
ee03d5c45d
fix compile warning
2011-06-03 09:56:10 +00:00
David Rose
44375f019d
explicit occlusion culling support from community member teedee, with additional enhancements by drwr
2011-03-18 01:56:09 +00:00
rdb
c823dd27ae
fix bug #716509 : NodePath.findMaterial does not work properly
2011-02-20 15:35:53 +00:00
David Rose
a8b7f6bc85
write_bam_file() should take a Filename
2011-01-18 19:10:16 +00:00
rdb
1eb6bf3d42
Add missing include (to fix compile error on FreeBSD)
2010-05-30 15:59:57 +00:00
David Rose
9d62ca9f98
one override per TextureStage, instead of a global override per TextureAttrib
2010-05-04 22:39:40 +00:00
Mike Christel
ad30e4c71f
Overload improved (not optimal, but better than list of string arguments) to set_shader_auto to allow any of normal, glow, gloss, ramp, shadow to be turned on or off via bitmask
2010-05-03 16:41:16 +00:00
Mike Christel
5dfa504370
Texture arrays added to Texture class, passed to shader through setShaderInput(name, texture). A new Cg type sampler2DArray has been added to the panda3d Shader Class.
2010-04-29 14:48:44 +00:00
Mike Christel
c308b57137
Overload added to set_shader_auto to allow any of normal, glow, gloss, ramp, shadow to be turned on or off
2010-04-16 14:06:26 +00:00
Mike Christel
6418e6f221
extended shader input system support for Cg (see Panda SE Project 2010-03-17 blog post for more details)
2010-04-07 11:16:29 +00:00
David Rose
4cf4811af6
more refinements to the whole shared-node pickle thing
2010-02-11 01:32:00 +00:00
David Rose
981890183b
bamify NodePath's parents etc too, to better support common nodes
2010-02-10 23:50:57 +00:00
David Rose
f6f9e269f4
introduce stdpy.pickle module with support for common-node NodePaths within a pickle stream
2010-02-10 19:43:58 +00:00
rdb
c136904fa9
Add hardware instancing support
2009-12-21 14:22:12 +00:00