Port little windows glfw opengl3 project to opengles2 -- 3
Budget: €30 – €250 EUR
Project source:https://github.com/tomaszte/porting-opengl3-to-opengles2.0
Your task would be to port files inside glfw dir (main.c & renderer.c) from opengl3 to opengles2.0.
To build, enter glfw dir and call build.bat (you will have to change paths to some libs, as I have them hardcoded)
The program is using microui imgui(https://github.com/rxi/microui) to draw few shapes (rectangles, text and icons copied from atlas, clipping):
//
glEnable(GL_SCISSOR_TEST);
while (mu_next_command(muCtx, &cmd))
{
switch (cmd->type)
{
case MU_COMMAND_TEXT:
r_draw_text(cmd->text.str, cmd->text.pos, cmd->text.color);
break;
case MU_COMMAND_RECT:
r_draw_rect(cmd->rect.rect, cmd->rect.color);
break;
case MU_COMMAND_ICON:
r_draw_icon(cmd->icon.id, cmd->icon.rect, cmd->icon.color);
break;
case MU_COMMAND_CLIP:
r_set_clip_rect(cmd->clip.rect);
break;
}
}
glDisable(GL_SCISSOR_TEST);
r_present();
//
My ultimate goal is to have project inside glfm-android working, it doesn't work right now, because unsupported opengl3 code is used, some example errors:
./renderer.c:30:25: error: use of undeclared identifier 'GL_TEXTURE_COORD_ARRAY'
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
./renderer.c:31:25: error: use of undeclared identifier 'GL_COLOR_ARRAY'
glEnableClientState(GL_COLOR_ARRAY);
./renderer.c:63:18: error: use of undeclared identifier 'GL_PROJECTION'
glMatrixMode(GL_PROJECTION);
./renderer.c:67:18: error: use of undeclared identifier 'GL_MODELVIEW'
glMatrixMode(GL_MODELVIEW);
but if you don't want to deal with android stuff it is ok, if you just port glfw project to opengles2.0, and I'll test glfm-android myself.
Tomasz
Your task would be to port files inside glfw dir (main.c & renderer.c) from opengl3 to opengles2.0.
To build, enter glfw dir and call build.bat (you will have to change paths to some libs, as I have them hardcoded)
The program is using microui imgui(https://github.com/rxi/microui) to draw few shapes (rectangles, text and icons copied from atlas, clipping):
//
glEnable(GL_SCISSOR_TEST);
while (mu_next_command(muCtx, &cmd))
{
switch (cmd->type)
{
case MU_COMMAND_TEXT:
r_draw_text(cmd->text.str, cmd->text.pos, cmd->text.color);
break;
case MU_COMMAND_RECT:
r_draw_rect(cmd->rect.rect, cmd->rect.color);
break;
case MU_COMMAND_ICON:
r_draw_icon(cmd->icon.id, cmd->icon.rect, cmd->icon.color);
break;
case MU_COMMAND_CLIP:
r_set_clip_rect(cmd->clip.rect);
break;
}
}
glDisable(GL_SCISSOR_TEST);
r_present();
//
My ultimate goal is to have project inside glfm-android working, it doesn't work right now, because unsupported opengl3 code is used, some example errors:
./renderer.c:30:25: error: use of undeclared identifier 'GL_TEXTURE_COORD_ARRAY'
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
./renderer.c:31:25: error: use of undeclared identifier 'GL_COLOR_ARRAY'
glEnableClientState(GL_COLOR_ARRAY);
./renderer.c:63:18: error: use of undeclared identifier 'GL_PROJECTION'
glMatrixMode(GL_PROJECTION);
./renderer.c:67:18: error: use of undeclared identifier 'GL_MODELVIEW'
glMatrixMode(GL_MODELVIEW);
but if you don't want to deal with android stuff it is ok, if you just port glfw project to opengles2.0, and I'll test glfm-android myself.
Tomasz