mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-27 07:03:36 -04:00
Merge branch 'release/1.10.x' into incoming
This commit is contained in:
commit
20e4704be2
@ -117,6 +117,10 @@ NodePath AICharacter::get_char_render() {
|
||||
return _window_render;
|
||||
}
|
||||
|
||||
std::string AICharacter::get_name() {
|
||||
return _name;
|
||||
}
|
||||
|
||||
void AICharacter::set_pf_guide(bool pf_guide) {
|
||||
_pf_guide = pf_guide;
|
||||
}
|
||||
|
@ -46,6 +46,8 @@ class EXPCL_PANDAAI AICharacter : public ReferenceCount {
|
||||
void set_char_render(NodePath render);
|
||||
NodePath get_char_render();
|
||||
|
||||
std::string get_name();
|
||||
|
||||
PUBLISHED:
|
||||
double get_mass();
|
||||
void set_mass(double m);
|
||||
@ -65,6 +67,8 @@ PUBLISHED:
|
||||
|
||||
explicit AICharacter(std::string model_name, NodePath model_np, double mass, double movt_force, double max_force);
|
||||
~AICharacter();
|
||||
|
||||
MAKE_PROPERTY(name, get_name);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -125,7 +125,7 @@ BulletWorld() {
|
||||
// Some prefered settings
|
||||
_world->getDispatchInfo().m_enableSPU = true; // default: true
|
||||
_world->getDispatchInfo().m_useContinuous = true; // default: true
|
||||
_world->getSolverInfo().m_splitImpulse = false; // default: false
|
||||
_world->getSolverInfo().m_splitImpulse = bullet_split_impulse;
|
||||
_world->getSolverInfo().m_numIterations = bullet_solver_iterations;
|
||||
}
|
||||
|
||||
|
@ -100,6 +100,11 @@ PRC_DESC("Specifies if events should be send when new contacts are "
|
||||
"contact events might create more load on the event queue "
|
||||
"then you might want! Default value is FALSE."));
|
||||
|
||||
ConfigVariableBool bullet_split_impulse
|
||||
("bullet-split-impulse", false,
|
||||
PRC_DESC("Penetrating recovery won't add momentum. "
|
||||
"btContactSolverInfo::m_splitImpulse. Default value is false."));
|
||||
|
||||
ConfigVariableInt bullet_solver_iterations
|
||||
("bullet-solver-iterations", 10,
|
||||
PRC_DESC("Specifies the number of iterations for the Bullet contact "
|
||||
|
@ -33,6 +33,7 @@ extern ConfigVariableEnum<BulletWorld::BroadphaseAlgorithm> bullet_broadphase_al
|
||||
extern ConfigVariableEnum<BulletWorld::FilterAlgorithm> bullet_filter_algorithm;
|
||||
extern ConfigVariableDouble bullet_sap_extents;
|
||||
extern ConfigVariableBool bullet_enable_contact_events;
|
||||
extern ConfigVariableBool bullet_split_impulse;
|
||||
extern ConfigVariableInt bullet_solver_iterations;
|
||||
extern ConfigVariableBool bullet_additional_damping;
|
||||
extern ConfigVariableDouble bullet_additional_damping_linear_factor;
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "pnmImage.h"
|
||||
#include "pnmReader.h"
|
||||
#include "pfmFile.h"
|
||||
#include "pnmFileTypeRegistry.h"
|
||||
#include "virtualFileSystem.h"
|
||||
#include "datagramInputFile.h"
|
||||
#include "datagramOutputFile.h"
|
||||
@ -5212,11 +5213,19 @@ do_write_one(CData *cdata, const Filename &fullpath, int z, int n) {
|
||||
success = pfm.write(fullpath);
|
||||
} else {
|
||||
// Writing a normal, integer texture.
|
||||
PNMFileType *type =
|
||||
PNMFileTypeRegistry::get_global_ptr()->get_type_from_extension(fullpath);
|
||||
if (type == nullptr) {
|
||||
gobj_cat.error()
|
||||
<< "Texture::write() - couldn't determine type from extension: " << fullpath << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
PNMImage pnmimage;
|
||||
if (!do_store_one(cdata, pnmimage, z, n)) {
|
||||
return false;
|
||||
}
|
||||
success = pnmimage.write(fullpath);
|
||||
success = pnmimage.write(fullpath, type);
|
||||
}
|
||||
|
||||
if (!success) {
|
||||
|
@ -397,6 +397,24 @@ r_prepare_scene(GraphicsStateGuardianBase *gsg, const RenderState *node_state,
|
||||
geom_state = state_munger->munge_state(geom_state);
|
||||
}
|
||||
|
||||
// As well as the shaders.
|
||||
const ShaderAttrib *sa;
|
||||
if (geom_state->get_attrib(sa)) {
|
||||
Shader *shader = (Shader *)sa->get_shader();
|
||||
if (shader != nullptr) {
|
||||
prepared_objects->enqueue_shader(shader);
|
||||
}
|
||||
else if (sa->auto_shader()) {
|
||||
gsg->ensure_generated_shader(geom_state);
|
||||
}
|
||||
else if (munger->is_of_type(StateMunger::get_class_type())) {
|
||||
// Premunge the state for the fixed-function pipeline.
|
||||
StateMunger *state_munger = (StateMunger *)munger.p();
|
||||
geom_state = state_munger->munge_state(geom_state);
|
||||
}
|
||||
// TODO: prepare the shader inputs.
|
||||
}
|
||||
|
||||
// And now prepare each of the textures.
|
||||
const TextureAttrib *ta;
|
||||
if (geom_state->get_attrib(ta)) {
|
||||
@ -409,16 +427,6 @@ r_prepare_scene(GraphicsStateGuardianBase *gsg, const RenderState *node_state,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// As well as the shaders.
|
||||
const ShaderAttrib *sa;
|
||||
if (geom_state->get_attrib(sa)) {
|
||||
Shader *shader = (Shader *)sa->get_shader();
|
||||
if (shader != nullptr) {
|
||||
prepared_objects->enqueue_shader(shader);
|
||||
}
|
||||
// TODO: prepare the shader inputs.
|
||||
}
|
||||
}
|
||||
|
||||
PandaNode::r_prepare_scene(gsg, node_state, transformer, current_thread);
|
||||
|
Loading…
x
Reference in New Issue
Block a user