void useProgram(const double projection[], const double modelView[]) { init(); glUseProgram(programId); GLfloat projectionf[16]; GLfloat modelViewf[16]; convertMatrix(projection, projectionf); convertMatrix(modelView, modelViewf); glUniformMatrix4fv(projectionUniformId, 1, GL_FALSE, projectionf); glUniformMatrix4fv(modelViewUniformId, 1, GL_FALSE, modelViewf); }
void GraphicsLayer13::setProjection(const QMatrix4x4& matrix) { GLfloat projection[16]; convertMatrix(matrix.constData(), projection); glMatrixMode(GL_PROJECTION); glLoadMatrixf(projection); glMatrixMode(GL_MODELVIEW); }
void GraphicsLayer13::setModelview(const QMatrix4x4& matrix) { GLfloat modelview[16]; convertMatrix(matrix.constData(), modelview); glLoadMatrixf(modelview); }
void GraphicsLayer21::setProjection(const QMatrix4x4& matrix) { m_projection = matrix; convertMatrix((m_projection * m_modelview).constData(), m_matrix[0]); m_program->setUniformValue(m_matrix_location, m_matrix); }
void Exporter::nodeTransform(Matrix33 &rot, Vector3 &trans, INode *node, TimeValue t, bool local) { Matrix3 tm = getNodeTransform(node, t, local); convertMatrix(rot, tm); trans.Set(tm.GetTrans().x, tm.GetTrans().y, tm.GetTrans().z); }