mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
Merge branch 'release/1.10.x'
This commit is contained in:
commit
1baef394b6
@ -200,7 +200,7 @@ fillin(DatagramIterator &scan, BamReader *manager) {
|
|||||||
|
|
||||||
size_t size = (size_t)_num_rows * (size_t)_num_cols;
|
size_t size = (size_t)_num_rows * (size_t)_num_cols;
|
||||||
delete [] _data;
|
delete [] _data;
|
||||||
_data = new float[size];
|
_data = new btScalar[size];
|
||||||
|
|
||||||
for (size_t i = 0; i < size; ++i) {
|
for (size_t i = 0; i < size; ++i) {
|
||||||
_data[i] = scan.get_stdfloat();
|
_data[i] = scan.get_stdfloat();
|
||||||
|
@ -888,7 +888,17 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) {
|
|||||||
|
|
||||||
// Add it once for each index.
|
// Add it once for each index.
|
||||||
for (bind._index = 0; bind._index < param_size; ++bind._index) {
|
for (bind._index = 0; bind._index < param_size; ++bind._index) {
|
||||||
|
// It was discovered in #846, that GLSL 4.10 and lower don't seem to
|
||||||
|
// guarantee that matrices occupy successive locations, and on macOS
|
||||||
|
// they indeed occupy four locations per element.
|
||||||
|
// As a big fat hack, we multiply by four on macOS, because this is
|
||||||
|
// hard to fix on the 1.10 branch. We'll have a proper fix on the
|
||||||
|
// master branch.
|
||||||
|
#ifdef __APPLE__
|
||||||
|
bind._id._seqno = p + bind._index * 4;
|
||||||
|
#else
|
||||||
bind._id._seqno = p + bind._index;
|
bind._id._seqno = p + bind._index;
|
||||||
|
#endif
|
||||||
_shader->cp_add_mat_spec(bind);
|
_shader->cp_add_mat_spec(bind);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -2514,9 +2514,10 @@ read(const ShaderFile &sfile, BamCacheRecord *record) {
|
|||||||
// Determine which language the shader is written in.
|
// Determine which language the shader is written in.
|
||||||
if (_language == SL_Cg) {
|
if (_language == SL_Cg) {
|
||||||
#ifdef HAVE_CG
|
#ifdef HAVE_CG
|
||||||
cg_get_profile_from_header(_default_caps);
|
ShaderCaps caps = _default_caps;
|
||||||
|
cg_get_profile_from_header(caps);
|
||||||
|
|
||||||
if (!cg_analyze_shader(_default_caps)) {
|
if (!cg_analyze_shader(caps)) {
|
||||||
shader_cat.error()
|
shader_cat.error()
|
||||||
<< "Shader encountered an error.\n";
|
<< "Shader encountered an error.\n";
|
||||||
return false;
|
return false;
|
||||||
@ -2606,9 +2607,10 @@ load(const ShaderFile &sbody, BamCacheRecord *record) {
|
|||||||
// Determine which language the shader is written in.
|
// Determine which language the shader is written in.
|
||||||
if (_language == SL_Cg) {
|
if (_language == SL_Cg) {
|
||||||
#ifdef HAVE_CG
|
#ifdef HAVE_CG
|
||||||
cg_get_profile_from_header(_default_caps);
|
ShaderCaps caps = _default_caps;
|
||||||
|
cg_get_profile_from_header(caps);
|
||||||
|
|
||||||
if (!cg_analyze_shader(_default_caps)) {
|
if (!cg_analyze_shader(caps)) {
|
||||||
shader_cat.error()
|
shader_cat.error()
|
||||||
<< "Shader encountered an error.\n";
|
<< "Shader encountered an error.\n";
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user