Compare commits

...

1 Commits

Author SHA1 Message Date
e6e567725b Color 2024-05-23 12:05:00 -04:00
2 changed files with 5 additions and 2 deletions

View File

@@ -82,7 +82,7 @@ public:
JGL::J2D::FillTriangle2D(JGL::Colors::Yellow, tri);
JGL::J3D::DrawString3D(JGL::Colors::White, "JGL Sample Text", {1, -120, 0.5f}, 2.f);
JGL::J3D::DrawString3D(JGL::Colors::Red, "JGL Sample Text", {1, -120, 0.5f}, 2.f);
JGL::J2D::DrawString2D(JGL::Colors::Green, "William J. Tomasine II ", 0.f, -120.f, 1.f);
JGL::J2D::DrawLine2D(JGL::Colors::Greens::DarkGreen, {10, 10}, {200, 300});

View File

@@ -225,8 +225,10 @@ namespace JGL
float x = pos.x;
float y = pos.y;
float z = pos.z;
GLfloat currentColor[4];
glGetFloatv(GL_CURRENT_COLOR, currentColor);
glUseProgram(0); // Fixed-function pipeline.
glColor3f(1.0f, 1.0f, 1.0f);
glColor4f(color.r, color.g, color.b, 1.0f);
FT_Set_Pixel_Sizes(face, 0, size);
@@ -282,6 +284,7 @@ namespace JGL
}
glBindTexture(GL_TEXTURE_2D, 0); // Unbind texture
glColor4f(currentColor[0], currentColor[1], currentColor[2], currentColor[3]); //Set draw color back to whatever it was before.
}
}