Fix Implementation of J2D::DrawLine2D & J3D::DrawLine3D
This commit is contained in:
25
main.cpp
25
main.cpp
@@ -38,8 +38,6 @@ const std::string fragmentShader = "varying vec2 texpos;\n"
|
||||
|
||||
using J3ML::LinearAlgebra::Matrix4x4;
|
||||
|
||||
|
||||
|
||||
struct point {
|
||||
GLfloat x;
|
||||
GLfloat y;
|
||||
@@ -81,20 +79,24 @@ public:
|
||||
{
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
JGL::J2D::FillRect2D(JGL::Colors::Yellow, {32, 32}, {100.5, 100.5});
|
||||
|
||||
JGL::RenderText("WHATS BOPPIN muth ~~~ niger ~~~ aphuqqa____?", 0.f, -100.f, 2.f);
|
||||
JGL::RenderText("Chinese characters don't work", 0.f, -120.f, 1.f);
|
||||
|
||||
JGL::J2D::FillRect2D(JGL::Colors::Yellow, {32, 32}, {100.5, 100.5});
|
||||
JGL::J2D::FillRect2D(JGL::Colors::Blue, {32, 32}, {100.5, 100.5});
|
||||
JGL::J2D::FillRect2D(JGL::Colors::Blue, {32, 32}, {100.5, 100.5});
|
||||
|
||||
JGL::Triangle2D tri
|
||||
{
|
||||
{10, -200},
|
||||
{105, 10},
|
||||
{-105, 10}
|
||||
{140, 200},
|
||||
{135, 100},
|
||||
{105, 100}
|
||||
};
|
||||
JGL::J2D::FillTriangle2D(JGL::Colors::Yellow, tri);
|
||||
|
||||
|
||||
JGL::RenderText("JGL Sample Text", 0.f, -100.f, 1.f, 32);
|
||||
JGL::RenderText("William J. Tomasine II ", 0.f, -120.f, 1.f);
|
||||
|
||||
JGL::J2D::DrawLine2D(JGL::Colors::Greens::DarkGreen, {10, 10}, {200, 300});
|
||||
JGL::J3D::DrawLine3D(JGL::Colors::Reds::Firebrick, {10, 10, -1.f}, {200, 200, 10.f});
|
||||
|
||||
//glFlush();
|
||||
}
|
||||
|
||||
@@ -105,7 +107,6 @@ public:
|
||||
}
|
||||
bool OnResizeRequest(const ReWindow::WindowResizeRequestEvent& e) override
|
||||
{
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user