ref: render code moved out of engine, doesn't compile, first API prototype

This commit is contained in:
Alibek Omarov
2019-02-18 21:25:26 +03:00
parent bccc0e63d5
commit 99bd7c81da
79 changed files with 2320 additions and 3467 deletions

View File

@@ -18,7 +18,7 @@ GNU General Public License for more details.
#include "const.h"
#include "library.h"
#include "triangleapi.h"
#include "gl_export.h"
#include "ref_common.h"
typedef int (*PHYSICAPI)( int, server_physics_api_t*, physics_interface_t* );
#ifndef XASH_DEDICATED
@@ -1884,17 +1884,19 @@ void SV_DrawDebugTriangles( void )
if( svgame.physFuncs.DrawDebugTriangles != NULL )
{
#if 0
// debug draws only
pglDisable( GL_BLEND );
pglDepthMask( GL_FALSE );
pglDisable( GL_TEXTURE_2D );
#endif
// draw wireframe overlay
svgame.physFuncs.DrawDebugTriangles ();
#if 0
pglEnable( GL_TEXTURE_2D );
pglDepthMask( GL_TRUE );
pglEnable( GL_BLEND );
#endif
}
}
@@ -2001,6 +2003,11 @@ const char* pfnGetModelName( int modelindex )
return sv.model_precache[modelindex];
}
static const byte *GL_TextureData( unsigned int texnum )
{
return ref.dllFuncs.GL_TextureData( texnum );
}
static server_physics_api_t gPhysicsAPI =
{
SV_LinkEdict,