Rekd2D::Core::Matrix4x4F Rekd2D::Core::Shader::GetMat4(const std::string &location) { std::map<std::string, unsigned int>::iterator it = m_Locations.find(location); int uniform; if (it == m_Locations.end()) { uniform = glGetUniformLocation(m_Program, location.c_str()); m_Locations.insert(std::pair<std::string, unsigned int>(location, uniform)); } else { uniform = m_Locations[location]; } float out[16]; glGetUniformfv(m_Program, uniform, out); return Matrix4x4F(out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7], out[8], out[9], out[10], out[11], out[12], out[13], out[14], out[15]); }
Matrix4x4F Vector3F::SkewMatrix3x3F() { return Matrix4x4F(0, z, -y, 0, -z, 0, x, 0, y, -x, 0, 0, 0, 0, 0, 0); }