Skip to content

Commit

Permalink
Use single argument Mat3::scale(float)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhasse committed Nov 27, 2024
1 parent af8649d commit 926d777
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/jngl/shapes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ void drawEllipse(const Vec2 position, const float width, const float height,

void drawEllipse(Mat3 modelview, float width, float height, float startAngle) {
glBindVertexArray(opengl::vaoStream);
auto tmp = useSimpleShaderProgram(
modelview.scale(static_cast<float>(getScaleFactor()), static_cast<float>(getScaleFactor())),
gShapeColor);
auto tmp =
useSimpleShaderProgram(modelview.scale(static_cast<float>(getScaleFactor())), gShapeColor);
std::vector<float> vertexes;
vertexes.push_back(0.f);
vertexes.push_back(0.f);
Expand Down Expand Up @@ -102,9 +101,7 @@ void drawCircle(Mat3 modelview, const float radius, const Rgba color) {

void drawCircle(Mat3 modelview, const Rgba color) {
glBindVertexArray(opengl::vaoStream);
auto tmp = useSimpleShaderProgram(
modelview.scale(static_cast<float>(getScaleFactor()), static_cast<float>(getScaleFactor())),
color);
auto tmp = useSimpleShaderProgram(modelview.scale(static_cast<float>(getScaleFactor())), color);
// clang-format off
const static float vertexes[] = {
1.f, 0.f, 0.9951847f, 0.09801714f, 0.9807853f, 0.1950903f, 0.9569403f, 0.2902847f,
Expand Down

0 comments on commit 926d777

Please sign in to comment.