version 1.2 | | version 1.3 |
---|
| | |
ogl_init_window(curx,cury); | | ogl_init_window(curx,cury); |
} | | } |
| | |
| | static Uint16 gammaramp[512]; |
| | static void init_gammaramp(void){ |
| | int i; |
| | for (i=0;i<256;++i) |
| | gammaramp[i]=i*256; |
| | for (i=256;i<512;++i) |
| | gammaramp[i]=0xffff; |
| | } |
| | |
| | int ogl_setbrightness_internal(void){ |
| | return SDL_SetGammaRamp(gammaramp + ogl_brightness_r*4, |
| | gammaramp + ogl_brightness_g*4, |
| | gammaramp + ogl_brightness_b*4 |
| | ); |
| | } |
| | |
| | //maybe we might add a real gamma setting (as opposed to brightness setting) |
| | //however, SDL_SetGamma seems to call SetGammaRamp internally, so we would need |
| | //to modify our own gamma ramp instead. |
| | //int ogl_setgamma_internal(void){ |
| | // float gamma=1+gr_palette_realgamma/8.0; |
| | // return SDL_SetGamma(gamma, gamma, gamma); |
| | //} |
| | |
void ogl_swap_buffers_internal(void){ | | void ogl_swap_buffers_internal(void){ |
SDL_GL_SwapBuffers(); | | SDL_GL_SwapBuffers(); |
} | | } |
| | |
SDL_GL_SetAttribute(SDL_GL_ACCUM_ALPHA_SIZE,0); | | SDL_GL_SetAttribute(SDL_GL_ACCUM_ALPHA_SIZE,0); |
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER,1); | | SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER,1); |
| | |
| | init_gammaramp(); |
} | | } |
void ogl_close(void){ | | void ogl_close(void){ |
/* if (ogl_fullscreen){ | | /* if (ogl_fullscreen){ |