diff options
author | Andrey Nazarov <skuller@skuller.net> | 2007-12-11 11:24:09 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2007-12-11 11:24:09 +0000 |
commit | e6358d790aa66b2c93584185158e7466f3ec166f (patch) | |
tree | 89e9715f0a9435f9b917fb6b5677ded4f9fbaebc /source/vid_sdl.c | |
parent | 8ef839c6d9b8204322aa04f4229fdf98a5323a46 (diff) |
Fixed crash inside CL_PacketEntities on player ents with negative skinnum.
Register all vwep models even with `cl_noskins 1'.
Fixed S_RegisterSexedSound to always use sounds corresponding to
visible player model.
Diffstat (limited to 'source/vid_sdl.c')
-rw-r--r-- | source/vid_sdl.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source/vid_sdl.c b/source/vid_sdl.c index c4c7063..c11041b 100644 --- a/source/vid_sdl.c +++ b/source/vid_sdl.c @@ -30,6 +30,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "key_public.h" #include "q2pro.xbm" #include <SDL.h> +#ifdef __unix__ +#include <GL/glx.h> +#include <GL/glxext.h> +#endif typedef struct { SDL_Surface *surface; @@ -38,6 +42,9 @@ typedef struct { vidFlags_t flags; qboolean mouseactive; // false when not focus app qboolean mouseinitialized; +#ifdef __unix__ + //PFNGLXGETVIDEOSYNCSGIPROC glXGetVideoSyncSGI; +#endif } sdl_state_t; static sdl_state_t sdl; @@ -386,6 +393,7 @@ static qboolean QSDL_InitGL( void ) { Com_EPrintf( "Couldn't set video mode: %s\n", SDL_GetError() ); goto fail; } +// sdl.glXGetVideoSyncSGI = SDL_GL_GetProcAddress( "glXGetVideoSyncSGI" ); CL_AppActivate( qtrue ); return qtrue; @@ -395,6 +403,23 @@ fail: return qfalse; } +#if 0 +qboolean QSDL_VideoSync( void ) { + GLuint count; + static GLuint oldcount; + + sdl.glXGetVideoSyncSGI( &count ); + + if( count != oldcount ) { + oldcount = count; + SDL_GL_SwapBuffers(); + // Com_Printf( "%u ", count ); + return qtrue; + } + return qfalse; +} +#endif + static void QSDL_BeginFrameGL( void ) { } |