mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
glgsg: hack fix for p3d_TextureMatrix[] error on macOS (#846)
This commit is contained in:
parent
b573cc3587
commit
0300ac8d3b
@ -890,7 +890,17 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) {
|
||||
|
||||
// Add it once for each 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;
|
||||
#endif
|
||||
_shader->_mat_spec.push_back(bind);
|
||||
}
|
||||
_shader->_mat_deps |= bind._dep[0];
|
||||
|
Loading…
x
Reference in New Issue
Block a user