void WGLWidget::uniformMatrix4(const UniformLocation &location, const JavaScriptMatrix4x4 &jsm) { if (!jsm.initialized()) throw WException("JavaScriptMatrix4x4: matrix not initialized"); pImpl_->uniformMatrix4(location, jsm); }
void WGLWidget::setJavaScriptMatrix4(JavaScriptMatrix4x4 &jsm, const WGenericMatrix<double, 4, 4> &m) { if (!jsm.initialized()) throw WException("JavaScriptMatrix4x4: matrix not initialized"); if (jsm.hasOperations()) throw WException("JavaScriptMatrix4x4: matrix was already operated on"); valueChanged_ = true; // set the server-side copy for (unsigned i = 0; i < jsMatrixList_.size(); i++) if (jsMatrixList_[i].id == jsm.id()) jsMatrixList_[i].serverSideCopy = m; pImpl_->setJavaScriptMatrix4(jsm, m); }