From 045eb8dc15f8e2ac11ddd751111d60521c743632 Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Tue, 19 Oct 2010 12:46:15 +0000 Subject: [PATCH] =?UTF-8?q?Kommentare=20f=C3=BCr=20den=20neuen=20Code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sdl/refresh.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/sdl/refresh.c b/src/sdl/refresh.c index 76c0511e..f37369a2 100644 --- a/src/sdl/refresh.c +++ b/src/sdl/refresh.c @@ -1,8 +1,3 @@ -#include -#include -#include -#include -#include #include #include @@ -14,7 +9,6 @@ SDL_Surface *surface; glwstate_t glw_state; -static cvar_t *use_stencil; qboolean have_stencil = false; /* @@ -38,6 +32,9 @@ int GLimp_Init(void) return true; } +/* + * Sets the window icon + */ static void SetSDLIcon() { SDL_Surface *icon; @@ -81,6 +78,9 @@ static void SetSDLIcon() SDL_FreeSurface(icon); } +/* + * Sets the hardware gamma + */ void UpdateHardwareGamma(void) { @@ -96,6 +96,9 @@ UpdateHardwareGamma(void) SDL_SetGamma(gamma, gamma, gamma ); } +/* + * Initializes the OpenGL window + */ static qboolean GLimp_InitGraphics( qboolean fullscreen ) { int flags; @@ -180,12 +183,17 @@ static qboolean GLimp_InitGraphics( qboolean fullscreen ) return true; } +/* + * Swaps the buffers to show the new frame + */ void GLimp_EndFrame (void) { SDL_GL_SwapBuffers(); } - +/* + * Changes the video mode + */ int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen ) { ri.Con_Printf (PRINT_ALL, "setting mode %d:", mode ); @@ -208,6 +216,9 @@ int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen ) return rserr_ok; } +/* + * Shuts the SDL render backend down + */ void GLimp_Shutdown( void ) { if (surface)