sgl

diff src/sgl.c @ 5:0570e27e5ebc

pretty much done with the basic functionality and GLX shit
author John Tsiombikas <nuclear@siggraph.org>
date Fri, 13 May 2011 07:49:47 +0300
parents 648f8604d2b2
children edbfc96fe80d
line diff
     1.1 --- a/src/sgl.c	Thu May 12 11:04:10 2011 +0300
     1.2 +++ b/src/sgl.c	Fri May 13 07:49:47 2011 +0300
     1.3 @@ -1,13 +1,13 @@
     1.4  #include "sgl.h"
     1.5  #include "wsys.h"
     1.6  
     1.7 -void sgl_register_modules(void);
     1.8 +void sgl_modules_init(void);
     1.9  
    1.10  static struct wsys_module *ws;
    1.11  
    1.12  int sgl_init(void)
    1.13  {
    1.14 -	sgl_register_modules();
    1.15 +	sgl_modules_init();
    1.16  	sgl_sort_modules();
    1.17  
    1.18  	if(!(ws = sgl_wsys_module())) {
    1.19 @@ -16,7 +16,7 @@
    1.20  	return ws->init();
    1.21  }
    1.22  
    1.23 -void sgl_shutdown(void)
    1.24 +void sgl_quit(void)
    1.25  {
    1.26  	ws->shutdown();
    1.27  }
    1.28 @@ -51,7 +51,22 @@
    1.29  	return ws->set_title(str);
    1.30  }
    1.31  
    1.32 +void sgl_redisplay(void)
    1.33 +{
    1.34 +	ws->redisplay();
    1.35 +}
    1.36 +
    1.37 +void sgl_swap_buffers(void)
    1.38 +{
    1.39 +	ws->swap_buffers();
    1.40 +}
    1.41 +
    1.42  int sgl_process_events(void)
    1.43  {
    1.44  	return ws->process_events();
    1.45  }
    1.46 +
    1.47 +void sgl_event_loop(void)
    1.48 +{
    1.49 +	while(ws->process_events() == 0);
    1.50 +}