Implement OutlineCircle2D and FillCircle2D
This commit is contained in:
13
main.cpp
13
main.cpp
@@ -8,6 +8,7 @@
|
||||
void initGL()
|
||||
{
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
glOrtho(-100.f, 100.f, -100.f, 100.f, -100.f, 100.f);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,9 +43,7 @@ void display() {
|
||||
glVertex2f(-0.9f, -0.3f);
|
||||
glEnd();
|
||||
|
||||
JGL::FillRect2D(JGL::Colors::White, {0, 0}, {128, 128});
|
||||
JGL::OutlineRect2D(JGL::Colors::Red, {0, 0}, {128, 128}, 4);
|
||||
JGL::DrawPixel2D(JGL::Colors::Green, {0, 0});
|
||||
|
||||
|
||||
glBegin(GL_TRIANGLES);
|
||||
glColor3f(0.0f, 0.0f, 1.f); // Blue
|
||||
@@ -70,6 +69,14 @@ void display() {
|
||||
glVertex2f(0.3f, 0.4f);
|
||||
glEnd();
|
||||
|
||||
JGL::J2D::FillRect2D(JGL::Colors::White, {0, 0}, {128, 128});
|
||||
JGL::J2D::OutlineRect2D(JGL::Colors::Red, {0, 0}, {128, 128}, 4);
|
||||
JGL::J2D::DrawPixel2D(JGL::Colors::Green, {0, 0});
|
||||
|
||||
JGL::J2D::FillCircle2D(JGL::Colors::Purples::DarkViolet, {0, 0}, 0.75f, 64);
|
||||
|
||||
|
||||
|
||||
glFlush(); // Render now
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user