Color
This commit is contained in:
2
main.cpp
2
main.cpp
@@ -82,7 +82,7 @@ public:
|
|||||||
JGL::J2D::FillTriangle2D(JGL::Colors::Yellow, tri);
|
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::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});
|
JGL::J2D::DrawLine2D(JGL::Colors::Greens::DarkGreen, {10, 10}, {200, 300});
|
||||||
|
@@ -225,8 +225,10 @@ namespace JGL
|
|||||||
float x = pos.x;
|
float x = pos.x;
|
||||||
float y = pos.y;
|
float y = pos.y;
|
||||||
float z = pos.z;
|
float z = pos.z;
|
||||||
|
GLfloat currentColor[4];
|
||||||
|
glGetFloatv(GL_CURRENT_COLOR, currentColor);
|
||||||
glUseProgram(0); // Fixed-function pipeline.
|
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);
|
FT_Set_Pixel_Sizes(face, 0, size);
|
||||||
|
|
||||||
@@ -282,6 +284,7 @@ namespace JGL
|
|||||||
|
|
||||||
}
|
}
|
||||||
glBindTexture(GL_TEXTURE_2D, 0); // Unbind texture
|
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.
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user