| 48 | } |
| 49 | |
| 50 | void ShapeRenderer::RenderRect(float centerX, float centerY, float width, |
| 51 | float height) { |
| 52 | float aspect = SceneManager::GetInstance()->GetScreenAspect(); |
| 53 | glm::mat4 orthoMat = glm::ortho(0.0f, aspect, 0.0f, 1.0f); |
| 54 | glm::mat4 modelMat, mat; |
| 55 | modelMat = glm::translate(glm::mat4(1.0f), glm::vec3(centerX, centerY, 0.0f)); |
| 56 | modelMat = glm::scale(modelMat, glm::vec3(width, height, 1.0f)); |
| 57 | mat = orthoMat * modelMat; |
| 58 | mTrivialShader->SetTintColor(mColor[0], mColor[1], mColor[2]); |
| 59 | mTrivialShader->RenderSimpleGeom(&mat, mGeom); |
| 60 | } |
no test coverage detected