mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
Merge branch 'release/1.10.x'
This commit is contained in:
commit
c293ad3da2
@ -367,6 +367,8 @@ class FilterManager(DirectObject):
|
|||||||
self.camstate = self.caminit
|
self.camstate = self.caminit
|
||||||
self.camera.node().setInitialState(self.caminit)
|
self.camera.node().setInitialState(self.caminit)
|
||||||
self.region.setCamera(self.camera)
|
self.region.setCamera(self.camera)
|
||||||
|
if hasattr(self.region, 'clearCullResult'):
|
||||||
|
self.region.clearCullResult()
|
||||||
self.nextsort = self.win.getSort() - 9
|
self.nextsort = self.win.getSort() - 9
|
||||||
self.basex = 0
|
self.basex = 0
|
||||||
self.basey = 0
|
self.basey = 0
|
||||||
|
@ -15,7 +15,7 @@ List the scene graph hierarchy in the bam file.
|
|||||||
List explicitly each transition in the hierarchy.
|
List explicitly each transition in the hierarchy.
|
||||||
.TP
|
.TP
|
||||||
.B \-g
|
.B \-g
|
||||||
Output verbose information about the each Geom in the Bam file.
|
Output verbose information about each Geom in the Bam file.
|
||||||
.TP
|
.TP
|
||||||
.B \-h
|
.B \-h
|
||||||
Display this help page.
|
Display this help page.
|
||||||
|
@ -38,8 +38,12 @@ def test_wheel(wheel, verbose=False):
|
|||||||
|
|
||||||
# Install pytest into the environment, as well as our wheel.
|
# Install pytest into the environment, as well as our wheel.
|
||||||
packages = ["pytest", wheel]
|
packages = ["pytest", wheel]
|
||||||
if sys.version_info[0:2] == (3, 4) and sys.platform == "win32":
|
if sys.version_info[0:2] == (3, 4):
|
||||||
packages += ["colorama==0.4.1"]
|
if sys.platform == "win32":
|
||||||
|
packages += ["colorama==0.4.1"]
|
||||||
|
|
||||||
|
# See https://github.com/python-attrs/attrs/pull/807
|
||||||
|
packages += ["attrs<21"]
|
||||||
|
|
||||||
if subprocess.call([python, "-m", "pip", "install"] + packages) != 0:
|
if subprocess.call([python, "-m", "pip", "install"] + packages) != 0:
|
||||||
shutil.rmtree(envdir)
|
shutil.rmtree(envdir)
|
||||||
|
@ -514,6 +514,15 @@ get_screenshot() {
|
|||||||
return tex;
|
return tex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void DisplayRegion::
|
||||||
|
clear_cull_result() {
|
||||||
|
CDCullWriter cdata_cull(_cycler_cull, true);
|
||||||
|
cdata_cull->_cull_result = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a special scene graph constructed to represent the results of the
|
* Returns a special scene graph constructed to represent the results of the
|
||||||
* last frame's cull operation.
|
* last frame's cull operation.
|
||||||
|
@ -160,6 +160,7 @@ PUBLISHED:
|
|||||||
bool get_screenshot(PNMImage &image);
|
bool get_screenshot(PNMImage &image);
|
||||||
PT(Texture) get_screenshot();
|
PT(Texture) get_screenshot();
|
||||||
|
|
||||||
|
void clear_cull_result();
|
||||||
virtual PT(PandaNode) make_cull_result_graph();
|
virtual PT(PandaNode) make_cull_result_graph();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -399,7 +399,7 @@ load_named_module(const string &name) {
|
|||||||
if (handle == nullptr) {
|
if (handle == nullptr) {
|
||||||
std::string error = load_dso_error();
|
std::string error = load_dso_error();
|
||||||
display_cat.warning()
|
display_cat.warning()
|
||||||
<< "Unable to load " << dlname.get_basename() << ": " << error << std::endl;
|
<< "Unable to load " << dlname.to_os_specific() << ": " << error << std::endl;
|
||||||
return TypeHandle::none();
|
return TypeHandle::none();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,7 +417,7 @@ load_named_module(const string &name) {
|
|||||||
if (dso_symbol == nullptr) {
|
if (dso_symbol == nullptr) {
|
||||||
// Couldn't find the module function.
|
// Couldn't find the module function.
|
||||||
display_cat.warning()
|
display_cat.warning()
|
||||||
<< "Unable to find " << symbol_name << " in " << dlname.get_basename()
|
<< "Unable to find " << symbol_name << " in " << dlname.to_os_specific()
|
||||||
<< "\n";
|
<< "\n";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -447,7 +447,7 @@ load_named_module(const string &name) {
|
|||||||
// though, because it may have assigned itself into the
|
// though, because it may have assigned itself into the
|
||||||
// GraphicsPipeSelection table. So we carry on.
|
// GraphicsPipeSelection table. So we carry on.
|
||||||
display_cat.warning()
|
display_cat.warning()
|
||||||
<< "No default pipe type available for " << dlname.get_basename()
|
<< "No default pipe type available for " << dlname.to_os_specific()
|
||||||
<< "\n";
|
<< "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4782,6 +4782,9 @@ release_swap_chain(DXScreenData *new_context) {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (new_context->_swap_chain == _swap_chain) {
|
||||||
|
_swap_chain = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1695,6 +1695,11 @@ close_buffer() {
|
|||||||
_fbo.clear();
|
_fbo.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_fbo_multisample != 0) {
|
||||||
|
glgsg->_glDeleteFramebuffers(1, &_fbo_multisample);
|
||||||
|
_fbo_multisample = 0;
|
||||||
|
}
|
||||||
|
|
||||||
report_my_gl_errors();
|
report_my_gl_errors();
|
||||||
|
|
||||||
// Release the Gsg
|
// Release the Gsg
|
||||||
|
@ -909,10 +909,14 @@ normalize() {
|
|||||||
*/
|
*/
|
||||||
void BitArray::
|
void BitArray::
|
||||||
write_datagram(BamWriter *manager, Datagram &dg) const {
|
write_datagram(BamWriter *manager, Datagram &dg) const {
|
||||||
dg.add_uint32(_array.size());
|
dg.add_uint32(_array.size() * (num_bits_per_word >> 5));
|
||||||
Array::const_iterator ai;
|
|
||||||
for (ai = _array.begin(); ai != _array.end(); ++ai) {
|
for (MaskType &item : _array) {
|
||||||
dg.add_uint32((*ai).get_word());
|
WordType word = item.get_word();
|
||||||
|
for (size_t i = 0; i < num_bits_per_word; i += 32) {
|
||||||
|
dg.add_uint32(word);
|
||||||
|
word >>= 32;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dg.add_uint8(_highest_bits);
|
dg.add_uint8(_highest_bits);
|
||||||
}
|
}
|
||||||
@ -922,10 +926,16 @@ write_datagram(BamWriter *manager, Datagram &dg) const {
|
|||||||
*/
|
*/
|
||||||
void BitArray::
|
void BitArray::
|
||||||
read_datagram(DatagramIterator &scan, BamReader *manager) {
|
read_datagram(DatagramIterator &scan, BamReader *manager) {
|
||||||
size_t num_words = scan.get_uint32();
|
size_t num_words32 = scan.get_uint32();
|
||||||
_array = Array::empty_array(num_words);
|
size_t num_bits = num_words32 << 5;
|
||||||
for (size_t i = 0; i < num_words; ++i) {
|
|
||||||
_array[i] = WordType(scan.get_uint32());
|
_array = Array::empty_array((num_bits + num_bits_per_word - 1) / num_bits_per_word);
|
||||||
|
|
||||||
|
for (size_t i = 0; i < num_bits; i += 32) {
|
||||||
|
int w = i / num_bits_per_word;
|
||||||
|
int b = i % num_bits_per_word;
|
||||||
|
|
||||||
|
_array[w].store(scan.get_uint32(), b, 32);
|
||||||
}
|
}
|
||||||
_highest_bits = scan.get_uint8();
|
_highest_bits = scan.get_uint8();
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ BamInfo() {
|
|||||||
|
|
||||||
add_option
|
add_option
|
||||||
("g", "", 0,
|
("g", "", 0,
|
||||||
"Output verbose information about the each Geom in the Bam file.",
|
"Output verbose information about each Geom in the Bam file.",
|
||||||
&BamInfo::dispatch_none, &_verbose_geoms);
|
&BamInfo::dispatch_none, &_verbose_geoms);
|
||||||
|
|
||||||
_num_scene_graphs = 0;
|
_num_scene_graphs = 0;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from math import floor, ceil
|
from math import floor, ceil
|
||||||
|
import sys
|
||||||
|
|
||||||
from panda3d.core import Vec2, Vec3, Vec4, Vec2F, Vec2D
|
from panda3d.core import Vec2, Vec3, Vec4, Vec2F, Vec2D
|
||||||
from panda3d import core
|
from panda3d import core
|
||||||
@ -124,6 +125,7 @@ def test_vec2_rmul():
|
|||||||
assert 2 * Vec2(3, -4) == Vec2(6, -8)
|
assert 2 * Vec2(3, -4) == Vec2(6, -8)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.xfail(sys.platform == "win32", reason="unknown precision issue")
|
||||||
@pytest.mark.parametrize("type", (core.LVecBase2f, core.LVecBase2d, core.LVecBase2i))
|
@pytest.mark.parametrize("type", (core.LVecBase2f, core.LVecBase2d, core.LVecBase2i))
|
||||||
def test_vec2_floordiv(type):
|
def test_vec2_floordiv(type):
|
||||||
with pytest.raises(ZeroDivisionError):
|
with pytest.raises(ZeroDivisionError):
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from math import floor, ceil
|
from math import floor, ceil
|
||||||
|
import sys
|
||||||
|
|
||||||
from panda3d.core import Vec2, Vec3, Vec3F, Vec3D
|
from panda3d.core import Vec2, Vec3, Vec3F, Vec3D
|
||||||
from panda3d import core
|
from panda3d import core
|
||||||
@ -109,6 +110,7 @@ def test_vec3_rmul():
|
|||||||
assert 2 * Vec3(0, 3, -4) == Vec3(0, 6, -8)
|
assert 2 * Vec3(0, 3, -4) == Vec3(0, 6, -8)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.xfail(sys.platform == "win32", reason="unknown precision issue")
|
||||||
@pytest.mark.parametrize("type", (core.LVecBase3f, core.LVecBase3d, core.LVecBase3i))
|
@pytest.mark.parametrize("type", (core.LVecBase3f, core.LVecBase3d, core.LVecBase3i))
|
||||||
def test_vec3_floordiv(type):
|
def test_vec3_floordiv(type):
|
||||||
with pytest.raises(ZeroDivisionError):
|
with pytest.raises(ZeroDivisionError):
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from math import floor, ceil
|
from math import floor, ceil
|
||||||
|
import sys
|
||||||
|
|
||||||
from panda3d.core import Vec2, Vec3, Vec4, Vec4F, Vec4D
|
from panda3d.core import Vec2, Vec3, Vec4, Vec4F, Vec4D
|
||||||
from panda3d import core
|
from panda3d import core
|
||||||
@ -125,6 +126,7 @@ def test_vec4_rmul():
|
|||||||
assert 2 * Vec4(0, 3, -4, 0.5) == Vec4(0, 6, -8, 1)
|
assert 2 * Vec4(0, 3, -4, 0.5) == Vec4(0, 6, -8, 1)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.xfail(sys.platform == "win32", reason="unknown precision issue")
|
||||||
@pytest.mark.parametrize("type", (core.LVecBase4f, core.LVecBase4d, core.LVecBase4i))
|
@pytest.mark.parametrize("type", (core.LVecBase4f, core.LVecBase4d, core.LVecBase4i))
|
||||||
def test_vec4_floordiv(type):
|
def test_vec4_floordiv(type):
|
||||||
with pytest.raises(ZeroDivisionError):
|
with pytest.raises(ZeroDivisionError):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user