21 lines
572 B
C
21 lines
572 B
C
|
|
#include "graphics/library/application_context.h"
|
||
|
|
|
||
|
|
#include <GLES2/gl2.h>
|
||
|
|
/* issues the onscreen display of the gl rendered buffer by swapping it with the current one */
|
||
|
|
void swapBuffers( application_context *app){
|
||
|
|
wl_display_dispatch_pending(app->w_context->display);
|
||
|
|
eglSwapBuffers( app->e_context->display, app->win->egl_surface);
|
||
|
|
}
|
||
|
|
|
||
|
|
int main(int argc, char* argv[]) {
|
||
|
|
application_context *app;
|
||
|
|
|
||
|
|
app = application_context_new( "Hello World");
|
||
|
|
|
||
|
|
while(1){
|
||
|
|
glClearColor(1, 0, 0, 0);
|
||
|
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||
|
|
swapBuffers( app);
|
||
|
|
}
|
||
|
|
}
|