9 SDL_Init (SDL_INIT_EVERYTHING);
11 SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1);
13 flags = SDL_OPENGL | SDL_GL_DOUBLEBUFFER | SDL_HWPALETTE | SDL_RESIZABLE | SDL_SWSURFACE;
14 SDL_SetVideoMode (200, 200, 32, flags);
16 glShadeModel (GL_SMOOTH);
17 glClearColor (0, 0, 0, 0);
18 glHint (GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
19 glViewport (0, 0, 200, 200);
20 glMatrixMode (GL_PROJECTION);
22 glOrtho (-200, 200, -200, 200, 0, 1);
23 glMatrixMode (GL_MODELVIEW);
26 return SCM_UNSPECIFIED;
31 scm_c_eval_string("(define contador (+ contador incremento))");
32 scm_c_eval_string("(if (> contador 1000) (define incremento -1))");
33 scm_c_eval_string("(if (< contador 0) (define incremento 1))");
42 strcpy(argv[0], "./gacela");
46 int lanzar_bucle2 () {
49 pthread_create(&t, NULL, bucle2, NULL);
56 pthread_create(&t, NULL, bucle, NULL);
57 return SCM_UNSPECIFIED;
60 /*SCM ver_contador () {
61 return scm_from_int(contador);
65 register_functions (void* data)
67 scm_c_define_gsubr ("prueba", 0, 0, 0, &prueba);
68 // scm_c_define_gsubr ("ver-contador", 0, 0, 0, &ver_contador);
69 scm_c_define_gsubr ("lanzar-bucle", 0, 0, 0, &lanzar_bucle);
74 int main (int argc, char *argv[]) {
75 scm_with_guile (®ister_functions, NULL);
76 scm_c_eval_string("(set-repl-prompt! \"gacela>\")");
77 scm_c_eval_string("(use-modules (ice-9 readline))");
78 scm_c_eval_string("(activate-readline)");
79 scm_c_eval_string("(define contador 0)");
80 scm_c_eval_string("(define incremento 1)");
81 // scm_shell (argc, argv);