Merge branch 'release/1.10.x'

This commit is contained in:
rdb 2019-01-23 23:28:28 +01:00
commit d8891674e3
37 changed files with 162 additions and 51 deletions

View File

@ -432,7 +432,7 @@ EXTRACT_STATIC = NO
# for Java sources.
# The default value is: YES.
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_CLASSES = NO
# This flag is only useful for Objective-C code. When set to YES local methods,
# which are defined in the implementation section but not in the interface are
@ -802,6 +802,11 @@ EXCLUDE = dtool/src/parser-inc \
panda/src/iphone \
panda/src/tinydisplay \
panda/src/movies/dr_flac.h \
panda/src/windisplay/winDetectDx.h \
panda/src/wgldisplay/wglext.h \
panda/src/glxdisplay/panda_glxext.h \
pandatool/src/gtk-stats \
dtool/src/dtoolbase/fakestringstream.h \
dtool/src/dtoolbase/pdtoa.cxx \
dtool/src/dtoolutil/panda_getopt_long.h \
dtool/src/dtoolutil/panda_getopt_impl.h \
@ -840,7 +845,10 @@ EXCLUDE_PATTERNS = */Opt*-*/* \
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
EXCLUDE_SYMBOLS =
EXCLUDE_SYMBOLS = InterrogateFunctionWrapper::Parameter \
CollisionFloorMesh::TriangleIndices \
tagTOUCHINPUT \
WINDOW_METRICS
# The EXAMPLE_PATH tag can be used to specify one or more files or directories
# that contain example code fragments that are included (see the \include
@ -1018,7 +1026,7 @@ ALPHABETICAL_INDEX = YES
# Minimum value: 1, maximum value: 20, default value: 5.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
COLS_IN_ALPHA_INDEX = 5
COLS_IN_ALPHA_INDEX = 3
# In case all classes in a project start with a common prefix, all classes will
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
@ -1972,6 +1980,7 @@ INCLUDE_FILE_PATTERNS =
PREDEFINED = TVOLATILE= \
INLINE=inline \
ALWAYS_INLINE=inline \
PUBLISHED=public \
protected=private \
INLINE_LINMATH=inline \
@ -1986,7 +1995,8 @@ PREDEFINED = TVOLATILE= \
MAKE_SEQ(x)= \
MAKE_SEQ_PROPERTY(x)= \
MAKE_MAP_PROPERTY(x)= \
MAKE_MAP_KEYS_SEQ(x)=
MAKE_MAP_KEYS_SEQ(x)= \
RETURNS_ALIGNED(x)=
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The

View File

@ -805,7 +805,7 @@ ALPHABETICAL_INDEX = YES
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
# in which this list will be split (can be a number in the range [1..20])
COLS_IN_ALPHA_INDEX = 5
COLS_IN_ALPHA_INDEX = 2
# In case all classes in a project start with a common prefix, all
# classes will be put under the same header in the alphabetical index.

View File

@ -155,24 +155,29 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built", libdir=GetLibDir(
libdir = prefix + "/" + libdir
# Create the directory structure that we will be putting our files in.
oscmd("mkdir -m 0755 -p "+destdir+prefix+"/bin")
oscmd("mkdir -m 0755 -p "+destdir+prefix+"/include")
oscmd("mkdir -m 0755 -p "+destdir+prefix+"/share/panda3d")
oscmd("mkdir -m 0755 -p "+destdir+prefix+"/share/mime-info")
oscmd("mkdir -m 0755 -p "+destdir+prefix+"/share/mime/packages")
oscmd("mkdir -m 0755 -p "+destdir+prefix+"/share/application-registry")
oscmd("mkdir -m 0755 -p "+destdir+prefix+"/share/applications")
oscmd("mkdir -m 0755 -p "+destdir+libdir+"/panda3d")
# Don't use os.makedirs or mkdir -p; neither properly set permissions for
# created intermediate directories.
MakeDirectory(destdir+prefix+"/bin", mode=0o755, recursive=True)
MakeDirectory(destdir+prefix+"/include", mode=0o755)
MakeDirectory(destdir+prefix+"/include/panda3d", mode=0o755)
MakeDirectory(destdir+prefix+"/share", mode=0o755)
MakeDirectory(destdir+prefix+"/share/panda3d", mode=0o755)
MakeDirectory(destdir+prefix+"/share/mime-info", mode=0o755)
MakeDirectory(destdir+prefix+"/share/mime", mode=0o755)
MakeDirectory(destdir+prefix+"/share/mime/packages", mode=0o755)
MakeDirectory(destdir+prefix+"/share/application-registry", mode=0o755)
MakeDirectory(destdir+prefix+"/share/applications", mode=0o755)
MakeDirectory(destdir+libdir+"/panda3d", mode=0o755, recursive=True)
for python_version in python_versions:
oscmd("mkdir -m 0755 -p "+destdir+python_version["purelib"])
oscmd("mkdir -m 0755 -p "+destdir+python_version["platlib"]+"/panda3d")
MakeDirectory(destdir+python_version["purelib"], mode=0o755, recursive=True)
MakeDirectory(destdir+python_version["platlib"]+"/panda3d", mode=0o755, recursive=True)
if (sys.platform.startswith("freebsd")):
oscmd("mkdir -m 0755 -p "+destdir+prefix+"/etc")
oscmd("mkdir -m 0755 -p "+destdir+"/usr/local/libdata/ldconfig")
MakeDirectory(destdir+prefix+"/etc", mode=0o755)
MakeDirectory(destdir+"/usr/local/libdata/ldconfig", mode=0o755, recursive=True)
else:
oscmd("mkdir -m 0755 -p "+destdir+"/etc/ld.so.conf.d")
MakeDirectory(destdir+"/etc/ld.so.conf.d", mode=0o755, recursive=True)
# Write the Config.prc file.
Configrc = ReadFile(outputdir+"/etc/Config.prc")
@ -184,7 +189,7 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built", libdir=GetLibDir(
WriteFile(destdir+"/etc/Config.prc", Configrc)
oscmd("cp "+outputdir+"/etc/Confauto.prc "+destdir+"/etc/Confauto.prc")
oscmd("cp -R "+outputdir+"/include "+destdir+prefix+"/include/panda3d")
oscmd("cp -R "+outputdir+"/include/* "+destdir+prefix+"/include/panda3d/")
oscmd("cp -R "+outputdir+"/pandac "+destdir+prefix+"/share/panda3d/")
oscmd("cp -R "+outputdir+"/models "+destdir+prefix+"/share/panda3d/")
if os.path.isdir("samples"): oscmd("cp -R samples "+destdir+prefix+"/share/panda3d/")
@ -237,8 +242,8 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built", libdir=GetLibDir(
DeleteEmptyDirs(destdir+prefix+"/include/panda3d")
# Change permissions on include directory.
os.chmod(destdir + prefix + "/include", 0o755)
for root, dirs, files in os.walk(destdir + prefix + "/include"):
os.chmod(destdir + prefix + "/include/panda3d", 0o755)
for root, dirs, files in os.walk(destdir + prefix + "/include/panda3d"):
for basename in dirs:
os.chmod(os.path.join(root, basename), 0o755)
for basename in files:

View File

@ -1104,8 +1104,18 @@ def GetOptimizeOption(opts):
##
########################################################################
def MakeDirectory(path):
if os.path.isdir(path): return 0
def MakeDirectory(path, mode=None, recursive=False):
if os.path.isdir(path):
return
if recursive:
parent = os.path.dirname(path)
if parent and not os.path.isdir(parent):
MakeDirectory(parent, mode=mode, recursive=True)
if mode is not None:
os.mkdir(path, mode)
else:
os.mkdir(path)
def ReadFile(wfile):

View File

@ -24,6 +24,8 @@ class LinuxInputDeviceManager;
* This is a type of device that uses the Linux /dev/input/event# API to read
* data from a raw mouse or other input device. Unlike the joystick API, the
* evdev API supports sending force feedback (ie. rumble) events.
*
* @since 1.10.0
*/
class EXPCL_PANDA_DEVICE EvdevInputDevice : public InputDevice {
public:

View File

@ -404,19 +404,19 @@ output(std::ostream &out) const {
<< (_axes.size() != 1 ? 'e' : 'i') << 's';
}
if (_features & (unsigned int)Feature::pointer) {
if (_features & (1 << (unsigned int)Feature::pointer)) {
out << ", pointer";
}
if (_features & (unsigned int)Feature::keyboard) {
if (_features & (1 << (unsigned int)Feature::keyboard)) {
out << ", keyboard";
}
if (_features & (unsigned int)Feature::tracker) {
if (_features & (1 << (unsigned int)Feature::tracker)) {
out << ", tracker";
}
if (_features & (unsigned int)Feature::vibration) {
if (_features & (1 << (unsigned int)Feature::vibration)) {
out << ", vibration";
}
if (_features & (unsigned int)Feature::battery) {
if (_features & (1 << (unsigned int)Feature::battery)) {
out << ", battery";
if (_battery_data.level > 0 && _battery_data.max_level > 0) {

View File

@ -47,6 +47,8 @@
* There is the DeviceType enumeration, however, which will (if known) contain
* identification of the general category of devices this fits in, such as
* keyboard, mouse, gamepad, or flight stick.
*
* @since 1.10.0
*/
class EXPCL_PANDA_DEVICE InputDevice : public TypedReferenceCount {
PUBLISHED:

View File

@ -27,6 +27,8 @@ class WinRawInputDevice;
/**
* This class keeps track of all the devices on a system, and sends out events
* when a device has been hot-plugged.
*
* @since 1.10.0
*/
class EXPCL_PANDA_DEVICE InputDeviceManager {
protected:

View File

@ -23,6 +23,8 @@ class LinuxInputDeviceManager;
/**
* This is a type of device that uses the Linux /dev/input/js# API to read
* data from a game controller.
*
* @since 1.10.0
*/
class EXPCL_PANDA_DEVICE LinuxJoystickDevice : public InputDevice {
PUBLISHED:

View File

@ -25,6 +25,8 @@ class WinInputDeviceManager;
/**
* This implementation of InputDevice uses the Win32 raw input API and the HID
* parser library to support a wide range of devices.
*
* @since 1.10.0
*/
class EXPCL_PANDA_DEVICE WinRawInputDevice final : public InputDevice {
public:

View File

@ -31,6 +31,8 @@ typedef struct tagRID_DEVICE_INFO RID_DEVICE_INFO;
/**
* This implementation of InputDevice uses Microsoft's XInput library to
* interface with an Xbox 360 game controller.
*
* @since 1.10.0
*/
class EXPCL_PANDA_DEVICE XInputDevice final : public InputDevice {
public:

View File

@ -12,7 +12,7 @@
*/
/**
*
* @since 1.10.0
*/
INLINE void EggMaterial::
set_base(const LColor &base) {
@ -21,7 +21,7 @@ set_base(const LColor &base) {
}
/**
*
* @since 1.10.0
*/
INLINE void EggMaterial::
clear_base() {
@ -29,7 +29,7 @@ clear_base() {
}
/**
*
* @since 1.10.0
*/
INLINE bool EggMaterial::
has_base() const {
@ -39,6 +39,8 @@ has_base() const {
/**
* It is legal to call this even if has_base() returns false. If so, it
* simply returns the default base color.
*
* @since 1.10.0
*/
INLINE LColor EggMaterial::
get_base() const {
@ -239,7 +241,7 @@ get_shininess() const {
}
/**
*
* @since 1.10.0
*/
INLINE void EggMaterial::
set_roughness(double roughness) {
@ -248,7 +250,7 @@ set_roughness(double roughness) {
}
/**
*
* @since 1.10.0
*/
INLINE void EggMaterial::
clear_roughness() {
@ -256,7 +258,7 @@ clear_roughness() {
}
/**
*
* @since 1.10.0
*/
INLINE bool EggMaterial::
has_roughness() const {
@ -264,7 +266,7 @@ has_roughness() const {
}
/**
*
* @since 1.10.0
*/
INLINE double EggMaterial::
get_roughness() const {
@ -276,7 +278,7 @@ get_roughness() const {
}
/**
*
* @since 1.10.0
*/
INLINE void EggMaterial::
set_metallic(double metallic) {
@ -285,7 +287,7 @@ set_metallic(double metallic) {
}
/**
*
* @since 1.10.0
*/
INLINE void EggMaterial::
clear_metallic() {
@ -293,7 +295,7 @@ clear_metallic() {
}
/**
*
* @since 1.10.0
*/
INLINE bool EggMaterial::
has_metallic() const {
@ -301,7 +303,7 @@ has_metallic() const {
}
/**
*
* @since 1.10.0
*/
INLINE double EggMaterial::
get_metallic() const {
@ -313,7 +315,7 @@ get_metallic() const {
}
/**
*
* @since 1.10.0
*/
INLINE void EggMaterial::
set_ior(double ior) {
@ -322,7 +324,7 @@ set_ior(double ior) {
}
/**
*
* @since 1.10.0
*/
INLINE void EggMaterial::
clear_ior() {
@ -330,7 +332,7 @@ clear_ior() {
}
/**
*
* @since 1.10.0
*/
INLINE bool EggMaterial::
has_ior() const {
@ -338,7 +340,7 @@ has_ior() const {
}
/**
*
* @since 1.10.0
*/
INLINE double EggMaterial::
get_ior() const {

View File

@ -55,6 +55,8 @@ class ConditionVarFull;
* coroutine, which only suspends the current task and not the entire thread.
*
* This API aims to mirror and be compatible with Python's Future class.
*
* @since 1.10.0
*/
class EXPCL_PANDA_EVENT AsyncFuture : public TypedReferenceCount {
PUBLISHED:

View File

@ -118,9 +118,11 @@ operator T * () const {
/**
* A thread-safe way to access the underlying pointer; will silently return
* null if the underlying pointer was deleted or null.
* Note that this may return null even if was_deleted() still returns true,
* Note that this may return null even if was_deleted() still returns false,
* which can occur if the object has reached reference count 0 and is about to
* be destroyed.
*
* @since 1.10.0
*/
template<class T>
INLINE PointerTo<T> WeakPointerTo<T>::
@ -397,6 +399,11 @@ operator const T * () const {
/**
* A thread-safe way to access the underlying pointer; will silently return
* null if the underlying pointer was deleted or null.
* Note that this may return null even if was_deleted() still returns false,
* which can occur if the object has reached reference count 0 and is about to
* be destroyed.
*
* @since 1.10.0
*/
template<class T>
INLINE ConstPointerTo<T> WeakConstPointerTo<T>::

View File

@ -290,7 +290,7 @@ update_type(To *ptr) {
* A thread-safe way to access the underlying pointer; will only write to the
* given pointer if the underlying pointer has not yet been deleted and is not
* null. Note that it may leave the pointer unassigned even if was_deleted()
* still returns true, which can occur if the object has reached reference
* still returns false, which can occur if the object has reached reference
* count 0 and is about to be destroyed.
*/
template<class T>

View File

@ -13,6 +13,8 @@
/**
* Increases the number of weak references.
*
* @since 1.10.0
*/
INLINE void WeakReferenceList::
ref() const {
@ -23,6 +25,8 @@ ref() const {
* Decreases the number of weak references. Returns true if, after this,
* there are still any weak or strong references remaining, or false if this
* structure should be deleted right away.
*
* @since 1.10.0
*/
INLINE bool WeakReferenceList::
unref() const {
@ -32,6 +36,8 @@ unref() const {
/**
* Returns true if the object represented has been deleted, ie. there are only
* weak references left pointing to the object.
*
* @since 1.10.0
*/
INLINE bool WeakReferenceList::
was_deleted() const {

View File

@ -37,6 +37,8 @@ WeakReferenceList::
*
* The data pointer can be an arbitrary pointer and is passed as only argument
* to the callback.
*
* @since 1.10.0
*/
void WeakReferenceList::
add_callback(WeakPointerCallback *callback, void *data) {
@ -61,6 +63,8 @@ add_callback(WeakPointerCallback *callback, void *data) {
* weak reference-counting pointer), this removes the indicated PointerToVoid
* structure from the list of such structures that are maintaining a weak
* pointer to this object.
*
* @since 1.10.0
*/
void WeakReferenceList::
remove_callback(WeakPointerCallback *callback) {
@ -73,6 +77,8 @@ remove_callback(WeakPointerCallback *callback) {
/**
* Called only by the ReferenceCount pointer to indicate that it has been
* deleted.
*
* @since 1.10.0
*/
void WeakReferenceList::
mark_deleted() {

View File

@ -215,6 +215,8 @@ make_patches() const {
/**
* Returns a new Geom with each primitive converted into a corresponding
* version with adjacency information.
*
* @since 1.10.0
*/
INLINE PT(Geom) Geom::
make_adjacency() const {

View File

@ -892,6 +892,8 @@ make_patches_in_place() {
*
* Don't call this in a downstream thread unless you don't mind it blowing
* away other changes you might have recently made in an upstream thread.
*
* @since 1.10.0
*/
void Geom::
make_adjacency_in_place() {

View File

@ -20,6 +20,8 @@
/**
* Defines a series of disconnected line segments with adjacency information,
* for use with geometry shaders.
*
* @since 1.10.0
*/
class EXPCL_PANDA_GOBJ GeomLinesAdjacency : public GeomPrimitive {
PUBLISHED:

View File

@ -18,7 +18,9 @@
#include "geomPrimitive.h"
/**
* Defines a series of line strips.
* Defines a series of line strips with adjacency information.
*
* @since 1.10.0
*/
class EXPCL_PANDA_GOBJ GeomLinestripsAdjacency : public GeomPrimitive {
PUBLISHED:

View File

@ -1038,6 +1038,8 @@ make_patches() const {
/**
* Adds adjacency information to this primitive. May return null if this type
* of geometry does not support adjacency information.
*
* @since 1.10.0
*/
CPT(GeomPrimitive) GeomPrimitive::
make_adjacency() const {

View File

@ -19,6 +19,8 @@
/**
* Defines a series of disconnected triangles, with adjacency information.
*
* @since 1.10.0
*/
class EXPCL_PANDA_GOBJ GeomTrianglesAdjacency : public GeomPrimitive {
PUBLISHED:

View File

@ -18,7 +18,9 @@
#include "geomPrimitive.h"
/**
* Defines a series of triangle strips.
* Defines a series of triangle strips with adjacency information.
*
* @since 1.10.0
*/
class EXPCL_PANDA_GOBJ GeomTristripsAdjacency : public GeomPrimitive {
PUBLISHED:

View File

@ -27,6 +27,8 @@ class PreparedGraphicsObjects;
/**
* This is a generic buffer object that lives in graphics memory.
*
* @since 1.10.0
*/
class EXPCL_PANDA_GOBJ ShaderBuffer : public TypedWritableReferenceCount, public Namable, public GeomEnums {
private:

View File

@ -175,6 +175,8 @@ setup_cube_map(int size, ComponentType component_type, Format format) {
* is not the same as the z_size. Follow up with read() or load() to fill the
* texture properties and image data, or use set_clear_color to let the
* texture be cleared to a solid color.
*
* @since 1.10.0
*/
INLINE void Texture::
setup_cube_map_array(int num_cube_maps) {
@ -189,6 +191,8 @@ setup_cube_map_array(int num_cube_maps) {
*
* The num_cube_maps given here is multiplied by six to become the z_size of
* the image.
*
* @since 1.10.0
*/
INLINE void Texture::
setup_cube_map_array(int size, int num_cube_maps, ComponentType component_type, Format format) {

View File

@ -21,6 +21,8 @@ class FlacAudioCursor;
/**
* Reads FLAC audio files. Ogg-encapsulated FLAC files are not supported.
*
* @since 1.10.0
*/
class EXPCL_PANDA_MOVIES FlacAudio : public MovieAudio {
PUBLISHED:

View File

@ -25,8 +25,10 @@ extern "C" {
class FlacAudio;
/**
* Interfaces with the libvorbisfile library to implement decoding of Ogg
* Vorbis audio files.
* Implements decoding of FLAC audio files.
*
* @see FlacAudio
* @since 1.10.0
*/
class EXPCL_PANDA_MOVIES FlacAudioCursor : public MovieAudioCursor {
PUBLISHED:

View File

@ -24,6 +24,8 @@ class OpusAudioCursor;
/**
* Interfaces with the libopusfile library to implement decoding of Opus
* audio files.
*
* @since 1.10.0
*/
class EXPCL_PANDA_MOVIES OpusAudio : public MovieAudio {
PUBLISHED:

View File

@ -28,6 +28,9 @@ class OpusAudio;
/**
* Interfaces with the libopusfile library to implement decoding of Opus
* audio files.
*
* @see OpusAudio
* @since 1.10.0
*/
class EXPCL_PANDA_MOVIES OpusAudioCursor : public MovieAudioCursor {
PUBLISHED:

View File

@ -78,6 +78,8 @@ set_color(const LColor &color) {
/**
* Returns true if the color was specified as a temperature in kelvins, and
* get_color_temperature is defined.
*
* @since 1.10.0
*/
INLINE bool Light::
has_color_temperature() const {
@ -87,6 +89,8 @@ has_color_temperature() const {
/**
* Returns the basic color temperature of the light, assuming
* has_color_temperature() returns true.
*
* @since 1.10.0
*/
INLINE PN_stdfloat Light::
get_color_temperature() const {

View File

@ -70,6 +70,8 @@ is_ambient_light() const {
*
* The default value is 6500 K, corresponding to a perfectly white light
* assuming a D65 white point.
*
* @since 1.10.0
*/
void Light::
set_color_temperature(PN_stdfloat temperature) {

View File

@ -24,6 +24,8 @@ class FactoryParams;
* If enabled, specifies that a custom logical operation be performed instead
* of any color blending. Setting it to a value other than M_none will cause
* color blending to be disabled and the given logic operation to be performed.
*
* @since 1.10.0
*/
class EXPCL_PANDA_PGRAPH LogicOpAttrib : public RenderAttrib {
PUBLISHED:

View File

@ -22,6 +22,8 @@
/**
* This is a type of area light that is an axis aligned rectangle, pointing
* along the Y axis in the positive direction.
*
* @since 1.10.0
*/
class EXPCL_PANDA_PGRAPHNODES RectangleLight : public LightLensNode {
PUBLISHED:

View File

@ -573,6 +573,8 @@ analyze_renderstate(ShaderKey &key, const RenderState *rs) {
* Call this if certain state has changed in such a way as to require a rerun
* of the shader generator. This should be rare because in most cases, the
* shader generator will automatically regenerate shaders as necessary.
*
* @since 1.10.0
*/
void ShaderGenerator::
rehash_generated_shaders() {
@ -614,6 +616,8 @@ rehash_generated_shaders() {
/**
* Removes all previously generated shaders, requiring all shaders to be
* regenerated. Does not clear cache of compiled shaders.
*
* @since 1.10.0
*/
void ShaderGenerator::
clear_generated_shaders() {

View File

@ -22,6 +22,8 @@
/**
* A sphere light is like a point light, except that it represents a sphere
* with a radius, rather than being an infinitely thin point in space.
*
* @since 1.10.0
*/
class EXPCL_PANDA_PGRAPHNODES SphereLight : public PointLight {
PUBLISHED:

View File

@ -801,6 +801,8 @@ get_text_scale() const {
/**
* Specifies the text direction. If none is specified, it will be guessed
* based on the contents of the string.
*
* @since 1.10.0
*/
INLINE void TextProperties::
set_direction(Direction direction) {
@ -811,6 +813,8 @@ set_direction(Direction direction) {
/**
* Clears the text direction setting. If no text direction is specified, it
* will be guessed based on the contents of the string.
*
* @since 1.10.0
*/
INLINE void TextProperties::
clear_direction() {
@ -819,7 +823,7 @@ clear_direction() {
}
/**
*
* @since 1.10.0
*/
INLINE bool TextProperties::
has_direction() const {
@ -828,6 +832,8 @@ has_direction() const {
/**
* Returns the direction of the text as specified by set_direction().
*
* @since 1.10.0
*/
INLINE TextProperties::Direction TextProperties::
get_direction() const {