| version 1.1 | | version 1.2 |
|---|
| | |
| #include "vers_id.h" | | #include "vers_id.h" |
| #include "error.h" | | #include "error.h" |
| #include "u_mem.h" | | #include "u_mem.h" |
| | | #include "args.h" |
| | | |
| static int curx=-1,cury=-1,curfull=0; | | static int curx=-1,cury=-1,curfull=0; |
| | | |
| void ogl_do_fullscreen_internal(void){ | | void ogl_do_fullscreen_internal(void){ |
| ogl_smash_texture_list_internal();//not needed | | |
| ogl_init_window(curx,cury); | | ogl_init_window(curx,cury); |
| } | | } |
| | | |
| | |
| } | | } |
| void ogl_destroy_window(void){ | | void ogl_destroy_window(void){ |
| if (gl_initialized){ | | if (gl_initialized){ |
| | | ogl_smash_texture_list_internal(); |
| SDL_ShowCursor(1); | | SDL_ShowCursor(1); |
| //gl_initialized=0; | | //gl_initialized=0; |
| //well..SDL doesn't really let you kill the window.. so we just need to wait for sdl_quit | | //well..SDL doesn't really let you kill the window.. so we just need to wait for sdl_quit |
| | |
| } | | } |
| | | |
| void ogl_init(void){ | | void ogl_init(void){ |
| | | int t; |
| | | if ((t=FindArg("-gl_red"))) |
| | | SDL_GL_SetAttribute( SDL_GL_RED_SIZE, atoi(Args[t+1]) ); |
| | | if ((t=FindArg("-gl_green"))) |
| | | SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, atoi(Args[t+1]) ); |
| | | if ((t=FindArg("-gl_blue"))) |
| | | SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, atoi(Args[t+1]) ); |
| | | if ((t=FindArg("-gl_alpha"))) |
| | | SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, atoi(Args[t+1]) ); |
| | | if ((t=FindArg("-gl_buffer"))) |
| | | SDL_GL_SetAttribute( SDL_GL_BUFFER_SIZE, atoi(Args[t+1]) ); |
| // SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 ); | | // SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 ); |
| // SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 ); | | // SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 ); |
| // SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 ); | | // SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 ); |
| // SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, ? ); | | // SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 8 ); |
| | | |
| | | |
| SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE,0); | | SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE,0); |
| SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE,0); | | SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE,0); |