mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
Merge branch 'release/1.9.x'
This commit is contained in:
commit
85386049f0
@ -17,6 +17,10 @@ This issue fixes several bugs that were still found in 1.9.2.
|
||||
* Improve performance of texture load and store operations
|
||||
* Fix crashes with pbuffers on Intel cards on Windows
|
||||
* Support for Autodesk Maya 2016.5
|
||||
* Add shadow-depth-bits config var to control shadow map depth
|
||||
* Fix cull issue when rendering cube map (or any multi-lens setup)
|
||||
* Fix crash rendering with the same camera to different contexts
|
||||
* Fix compile error when making static build with DX9 renderer
|
||||
|
||||
------------------------ RELEASE 1.9.2 ------------------------
|
||||
|
||||
|
@ -118,6 +118,23 @@ PStatCollector GraphicsEngine::_occlusion_passed_pcollector("Occlusion results:V
|
||||
PStatCollector GraphicsEngine::_occlusion_failed_pcollector("Occlusion results:Occluded");
|
||||
PStatCollector GraphicsEngine::_occlusion_tests_pcollector("Occlusion tests");
|
||||
|
||||
// This is used to keep track of which scenes we have already culled.
|
||||
struct CullKey {
|
||||
GraphicsStateGuardian *_gsg;
|
||||
NodePath _camera;
|
||||
int _lens_index;
|
||||
};
|
||||
|
||||
INLINE static bool operator < (const CullKey &a, const CullKey &b) {
|
||||
if (a._gsg != b._gsg) {
|
||||
return a._gsg < b._gsg;
|
||||
}
|
||||
if (a._camera != b._camera) {
|
||||
return a._camera < b._camera;
|
||||
}
|
||||
return a._lens_index < b._lens_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new GraphicsEngine object. The Pipeline is normally left to
|
||||
* default to NULL, which indicates the global render pipeline, but it may be
|
||||
@ -1375,7 +1392,6 @@ cull_to_bins(const GraphicsEngine::Windows &wlist, Thread *current_thread) {
|
||||
|
||||
// Keep track of the cameras we have already used in this thread to render
|
||||
// DisplayRegions.
|
||||
typedef pair<NodePath, int> CullKey;
|
||||
typedef pmap<CullKey, DisplayRegion *> AlreadyCulled;
|
||||
AlreadyCulled already_culled;
|
||||
|
||||
@ -1390,10 +1406,13 @@ cull_to_bins(const GraphicsEngine::Windows &wlist, Thread *current_thread) {
|
||||
if (dr != (DisplayRegion *)NULL) {
|
||||
DisplayRegionPipelineReader *dr_reader =
|
||||
new DisplayRegionPipelineReader(dr, current_thread);
|
||||
NodePath camera = dr_reader->get_camera();
|
||||
int lens_index = dr_reader->get_lens_index();
|
||||
|
||||
AlreadyCulled::iterator aci = already_culled.insert(AlreadyCulled::value_type(CullKey(camera, lens_index), (DisplayRegion *)NULL)).first;
|
||||
CullKey key;
|
||||
key._gsg = win->get_gsg();
|
||||
key._camera = dr_reader->get_camera();
|
||||
key._lens_index = dr_reader->get_lens_index();
|
||||
|
||||
AlreadyCulled::iterator aci = already_culled.insert(AlreadyCulled::value_type(key, (DisplayRegion *)NULL)).first;
|
||||
if ((*aci).second == NULL) {
|
||||
// We have not used this camera already in this thread. Perform
|
||||
// the cull operation.
|
||||
|
@ -188,6 +188,19 @@ get_upon_death() {
|
||||
*/
|
||||
void PythonTask::
|
||||
set_owner(PyObject *owner) {
|
||||
#ifndef NDEBUG
|
||||
if (owner != Py_None) {
|
||||
PyObject *add = PyObject_GetAttrString(owner, "_addTask");
|
||||
PyObject *clear = PyObject_GetAttrString(owner, "_clearTask");
|
||||
|
||||
if (add == NULL || !PyCallable_Check(add) ||
|
||||
clear == NULL || !PyCallable_Check(clear)) {
|
||||
Dtool_Raise_TypeError("owner object should have _addTask and _clearTask methods");
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (_owner != NULL && _owner != Py_None && _state != S_inactive) {
|
||||
unregister_from_owner();
|
||||
}
|
||||
@ -494,10 +507,16 @@ do_python_task() {
|
||||
ostringstream strm;
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
PyObject *str = PyObject_ASCII(result);
|
||||
if (str == NULL) {
|
||||
str = PyUnicode_FromString("<repr error>");
|
||||
}
|
||||
strm
|
||||
<< *this << " returned " << PyUnicode_AsUTF8(str);
|
||||
#else
|
||||
PyObject *str = PyObject_Repr(result);
|
||||
if (str == NULL) {
|
||||
str = PyString_FromString("<repr error>");
|
||||
}
|
||||
strm
|
||||
<< *this << " returned " << PyString_AsString(str);
|
||||
#endif
|
||||
@ -606,18 +625,9 @@ call_owner_method(const char *method_name) {
|
||||
if (_owner != Py_None) {
|
||||
PyObject *func = PyObject_GetAttrString(_owner, (char *)method_name);
|
||||
if (func == (PyObject *)NULL) {
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
PyObject *str = PyObject_ASCII(_owner);
|
||||
task_cat.error()
|
||||
<< "Owner object " << PyUnicode_AsUTF8(str) << " added to "
|
||||
<< *this << " has no method " << method_name << "().\n";
|
||||
#else
|
||||
PyObject *str = PyObject_Repr(_owner);
|
||||
task_cat.error()
|
||||
<< "Owner object " << PyString_AsString(str) << " added to "
|
||||
<< *this << " has no method " << method_name << "().\n";
|
||||
#endif
|
||||
Py_DECREF(str);
|
||||
<< "Owner object added to " << *this << " has no method "
|
||||
<< method_name << "().\n";
|
||||
|
||||
} else {
|
||||
call_function(func);
|
||||
|
@ -94,7 +94,7 @@ open_framework(int &argc, char **&argv) {
|
||||
extern EXPCL_PANDAGL void init_libpandagl();
|
||||
init_libpandagl();
|
||||
#elif defined(HAVE_DX9)
|
||||
extern EXPCL_PANDADX9 void init_libpandadx9();
|
||||
extern EXPCL_PANDADX void init_libpandadx9();
|
||||
init_libpandadx9();
|
||||
#elif defined(HAVE_TINYDISPLAY)
|
||||
extern EXPCL_TINYDISPLAY void init_libtinydisplay();
|
||||
|
Loading…
x
Reference in New Issue
Block a user