Merge branch 'release/1.9.x' (though keep template exporting in master)

This commit is contained in:
rdb 2015-06-06 17:03:27 +02:00
commit 8e58e9e11c
6 changed files with 108 additions and 16 deletions

View File

@ -1,3 +1,34 @@
------------------------ RELEASE 1.9.1 ------------------------
This minor release fixes some important regressions and bugs found
in 1.9.0, but also introduces a few minor features.
It also reintroduces the deployment pipeline that was absent from
the previous release.
* Textures were not being scaled to power-of-2 in some cases
* Fix various issues with shader inputs
* Bullet step function accidentally defaulted to step size of 0
* Use model-path for finding libRocket assets
* Fix inconsistent behavior with non-power-of-2 textures in rocket
* Fix regression with memoryviews
* Fix symbol error when loading libp3ffmpeg on Mac OS X
* Fix issues running maya2egg on Mac OS X
* PStats now tracks memory residency of graphics buffers
* Support wireframe and point rendering modes in OpenGL ES
* Add missing keys to libRocket keymap
* Fix incorrect parsing of numbers with exponents in Config.prc
* Various performance optimizations
* Fix for reading URLs mounted via the virtual file system
* Improve GLSL error reporting
* Fix issue with model disappearing in rare cases with GLSL
* Fix shader generator memory leaks and runtime performance
* Add M_confined mouse mode that keeps cursor in window
* Expose _NET_WM_PID to window managers in X11
* bam2egg supports collision sphere and plane solids
* Add sample program demonstrating mouse modes
* Add -L (lighting) and -P (graphics pipe) pview options
------------------------ RELEASE 1.9.0 ------------------------
This is a major release with many exciting new features!

View File

@ -360,8 +360,6 @@ private:
static TypeHandle _type_handle;
};
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_DISPLAY, EXPTP_PANDA_DISPLAY, epvector<DisplayRegion::Region>);
#include "displayRegion.I"
#endif /* DISPLAYREGION_H */

View File

@ -65,9 +65,6 @@ private:
Morphs _morphs;
};
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, EggMorphList<EggMorph<LVector3d> >);
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, EggMorphList<EggMorph<LVector4> >);
typedef EggMorphList<EggMorphVertex> EggMorphVertexList;
typedef EggMorphList<EggMorphNormal> EggMorphNormalList;
typedef EggMorphList<EggMorphTexCoord> EggMorphTexCoordList;

View File

@ -431,7 +431,6 @@ convert_collision_node(CollisionNode *node, const WorkingNodePath &node_path,
apply_node_properties(egg_group, node, false);
// turn it into a collision node
egg_group->set_cs_type(EggGroup::CST_polyset);
egg_group->set_collide_flags(EggGroup::CF_descend);
NodePath np = node_path.get_node_path();
@ -451,6 +450,8 @@ convert_collision_node(CollisionNode *node, const WorkingNodePath &node_path,
for (int i = 0; i < num_solids; i++) {
CPT(CollisionSolid) child = node->get_solid(i);
if (child->is_of_type(CollisionPolygon::get_class_type())) {
egg_group->set_cs_type(EggGroup::CST_polyset);
EggPolygon *egg_poly = new EggPolygon;
egg_group->add_child(egg_poly);
@ -464,10 +465,71 @@ convert_collision_node(CollisionNode *node, const WorkingNodePath &node_path,
EggVertex *new_egg_vert = cvpool->create_unique_vertex(egg_vert);
egg_poly->add_vertex(new_egg_vert);
}
} else if (child->is_of_type(CollisionPlane::get_class_type())) {
nout << "Encountered unhandled collsion type: CollisionPlane" << "\n";
} else if (child->is_of_type(CollisionSphere::get_class_type())) {
nout << "Encountered unhandled collsion type: CollisionSphere" << "\n";
CPT(CollisionSphere) sphere = DCAST(CollisionSphere, child);
LPoint3 center = sphere->get_center();
LVector3 offset(sphere->get_radius(), 0, 0);
EggGroup *egg_sphere;
if (num_solids == 1) {
egg_sphere = egg_group;
} else {
egg_sphere = new EggGroup;
egg_sphere->set_collide_flags(EggGroup::CF_descend);
egg_group->add_child(egg_sphere);
}
egg_sphere->set_cs_type(EggGroup::CST_sphere);
EggVertex ev1, ev2;
ev1.set_pos(LCAST(double, (center + offset) * net_mat));
ev2.set_pos(LCAST(double, (center - offset) * net_mat));
EggPolygon *egg_poly = new EggPolygon;
egg_sphere->add_child(egg_poly);
egg_poly->add_vertex(cvpool->create_unique_vertex(ev1));
egg_poly->add_vertex(cvpool->create_unique_vertex(ev2));
} else if (child->is_of_type(CollisionPlane::get_class_type())) {
LPlane plane = DCAST(CollisionPlane, child)->get_plane();
LPoint3 origin = plane.get_point();
LVector3 normal = plane.get_normal();
// Get an arbitrary vector on the plane by taking the cross product
// with any vector, as long as it is different.
LVector3 vec1;
if (abs(normal[2]) > abs(normal[1])) {
vec1 = normal.cross(LVector3(0, 1, 0));
} else {
vec1 = normal.cross(LVector3(0, 0, 1));
}
// Find a second vector perpendicular to the two.
LVector3 vec2 = normal.cross(vec1);
EggGroup *egg_plane;
if (num_solids == 1) {
egg_plane = egg_group;
} else {
egg_plane = new EggGroup;
egg_plane->set_collide_flags(EggGroup::CF_descend);
egg_group->add_child(egg_plane);
}
egg_plane->set_cs_type(EggGroup::CST_plane);
EggVertex ev0, ev1, ev2;
ev0.set_pos(LCAST(double, origin * net_mat));
ev1.set_pos(LCAST(double, (origin + vec1) * net_mat));
ev2.set_pos(LCAST(double, (origin + vec2) * net_mat));
EggPolygon *egg_poly = new EggPolygon;
egg_plane->add_child(egg_poly);
egg_poly->add_vertex(cvpool->create_unique_vertex(ev0));
egg_poly->add_vertex(cvpool->create_unique_vertex(ev1));
egg_poly->add_vertex(cvpool->create_unique_vertex(ev2));
} else if (child->is_of_type(CollisionBox::get_class_type())) {
nout << "Encountered unhandled collsion type: CollisionBox" << "\n";
} else if (child->is_of_type(CollisionInvSphere::get_class_type())) {

View File

@ -82,12 +82,18 @@ do_compute_projection_mat(Lens::CData *lens_cdata) {
PN_stdfloat fl = do_get_focal_length(lens_cdata);
PN_stdfloat fFar = do_get_far(lens_cdata);
PN_stdfloat fNear = do_get_near(lens_cdata);
PN_stdfloat far_minus_near = fFar-fNear;
PN_stdfloat a = (fFar + fNear);
PN_stdfloat b = -2.0f * fFar * fNear;
PN_stdfloat a, b;
a /= far_minus_near;
b /= far_minus_near;
if (cinf(fFar)) {
a = 1;
b = -2 * fNear;
} else {
PN_stdfloat far_minus_near = fFar-fNear;
a = (fFar + fNear);
b = -2 * fFar * fNear;
a /= far_minus_near;
b /= far_minus_near;
}
LMatrix4 canonical;
switch (cs) {

View File

@ -607,8 +607,6 @@ private:
static TypeHandle _type_handle;
};
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_GOBJ, EXPTP_PANDA_GOBJ, epvector<Shader::ShaderMatSpec>);
#include "shader.I"
#endif