Hello Spear-kor,
In your yocto BSP you have the graphics examples, that include the triangle as example two, data in the
ESContext structure include information such as the window width and height, EGL context, and callback function pointers.
The rest of the main function is responsible for creating the window, initializing
the draw callback function, and entering the main loop:
esCreateWindow(&esContext, "Hello Triangle", 320, 240,
ES_WINDOW_RGB);
if(!Init(&esContext))
return 0;
esRegisterDrawFunc(&esContext, Draw);
esMainLoop(&esContext);
Regards