Nope, that's one of my old topics but for now I able to compile the same UEViewer source with simple batch script including build tools and now I trying to make some changes with 'GLWindow.cpp' so under
static void Set3Dmode()
I add
void drawGrid();
and as you can see I trying to add grid for meshes in this OpenGL. And the actual code is
void drawGrid();
{
float x = 0;
float y = 0;
void init(void)
{
//glClearColor (1.0, 1.0, 1.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0, 5.0, 0.0, 5.0, -2.0, 2.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
void drawLine(); (float x1, float y1, float x2, float y2)
{
glBegin(GL_LINES);
glVertex2f(x1, y1);
glVertex2f(x2, y2);
glEnd();
}
{
glClearColor(1.0, 1.0, 1.0, 1.0);
glColor3ub(240, 57, 53);
for (float i = 0; i < HEIGHT; i += 10)
{
if ((int)i % 100 == 0) glLineWidth(3.0);
else if ((int)i % 50 == 0) glLineWidth(2.0);
else glLineWidth(1.0);
drawline(0, i, (float)WIDTH, i);
}
for (float i = 0; i < WIDTH; i += 10)
{
if ((int)i % 100 == 0) glLineWidth(3.0);
else if ((int)i % 50 == 0) glLineWidth(2.0);
else glLineWidth(1.0);
drawline(i, 0, i, (float)HEIGHT);
}
}
}
But I get really weird error while compile.
https://ibb.co/MRwrrvSCan you help me?