mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
allow binding float[n] variables to float[n-1] variables in Cg shaders
This commit is contained in:
parent
fc8935035a
commit
72af325f2b
@ -642,7 +642,7 @@ issue_parameters(GSG *gsg, int altered) {
|
|||||||
int input_size = _ptr._dim[0] * _ptr._dim[1] * _ptr._dim[2];
|
int input_size = _ptr._dim[0] * _ptr._dim[1] * _ptr._dim[2];
|
||||||
|
|
||||||
// dimension is negative only if the parameter had the (deprecated)k_ prefix.
|
// dimension is negative only if the parameter had the (deprecated)k_ prefix.
|
||||||
if ((input_size != ptr_data->_size) && (_ptr._dim[0] > 0)) {
|
if ((input_size > ptr_data->_size) && (_ptr._dim[0] > 0)) {
|
||||||
GLCAT.error() << _ptr._id._name << ": incorrect number of elements, expected "
|
GLCAT.error() << _ptr._id._name << ": incorrect number of elements, expected "
|
||||||
<< input_size <<" got " << ptr_data->_size << "\n";
|
<< input_size <<" got " << ptr_data->_size << "\n";
|
||||||
release_resources(gsg);
|
release_resources(gsg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user