mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-02-02 18:24:15 +00:00
ref_gl: move gl specific defines out from defaults.h, remove VIDEO_DONTCARE hack, automatically set XASH_GLES if wrapper is set
This commit is contained in:
parent
a9cf3357c7
commit
441795943b
@ -18,7 +18,6 @@ GNU General Public License for more details.
|
|||||||
#define BACKENDS_H
|
#define BACKENDS_H
|
||||||
|
|
||||||
// video backends (XASH_VIDEO)
|
// video backends (XASH_VIDEO)
|
||||||
#define VIDEO_DONTCARE -1 // a special mode for ref_dll
|
|
||||||
#define VIDEO_NULL 0
|
#define VIDEO_NULL 0
|
||||||
#define VIDEO_SDL 1
|
#define VIDEO_SDL 1
|
||||||
#define VIDEO_ANDROID 2
|
#define VIDEO_ANDROID 2
|
||||||
|
@ -95,11 +95,7 @@ SETUP BACKENDS DEFINITIONS
|
|||||||
// fallback to NULL
|
// fallback to NULL
|
||||||
//
|
//
|
||||||
#ifndef XASH_VIDEO
|
#ifndef XASH_VIDEO
|
||||||
#ifdef REF_DLL
|
#define XASH_VIDEO VIDEO_NULL
|
||||||
#define XASH_VIDEO VIDEO_DONTCARE
|
|
||||||
#else
|
|
||||||
#define XASH_VIDEO VIDEO_NULL
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef XASH_SOUND
|
#ifndef XASH_SOUND
|
||||||
@ -132,10 +128,6 @@ Default build-depended cvar and constant values
|
|||||||
// You need add library loading code to library.c when adding new platform
|
// You need add library loading code to library.c when adding new platform
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined XASH_NANOGL || defined XASH_WES || defined XASH_REGAL
|
|
||||||
#define XASH_GL_STATIC
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define DEFAULT_SV_MASTER "ms.xash.su:27010"
|
#define DEFAULT_SV_MASTER "ms.xash.su:27010"
|
||||||
// Set ForceSimulating to 1 by default for dedicated, because AMXModX timers require this
|
// Set ForceSimulating to 1 by default for dedicated, because AMXModX timers require this
|
||||||
// TODO: enable simulating for any server?
|
// TODO: enable simulating for any server?
|
||||||
|
@ -16,7 +16,6 @@ GNU General Public License for more details.
|
|||||||
#ifndef GL_LOCAL_H
|
#ifndef GL_LOCAL_H
|
||||||
#define GL_LOCAL_H
|
#define GL_LOCAL_H
|
||||||
#include "port.h"
|
#include "port.h"
|
||||||
#include "defaults.h"
|
|
||||||
#include "xash3d_types.h"
|
#include "xash3d_types.h"
|
||||||
#include "cvardef.h"
|
#include "cvardef.h"
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
@ -35,6 +34,11 @@ GNU General Public License for more details.
|
|||||||
#include "pm_movevars.h"
|
#include "pm_movevars.h"
|
||||||
//#include "cvar.h"
|
//#include "cvar.h"
|
||||||
|
|
||||||
|
#if defined XASH_NANOGL || defined XASH_WES || defined XASH_REGAL
|
||||||
|
#define XASH_GLES
|
||||||
|
#define XASH_GL_STATIC
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef offsetof
|
#ifndef offsetof
|
||||||
#define offsetof(s,m) (size_t)&(((s *)0)->m)
|
#define offsetof(s,m) (size_t)&(((s *)0)->m)
|
||||||
#endif // offsetof
|
#endif // offsetof
|
||||||
|
@ -79,23 +79,23 @@ def build(bld):
|
|||||||
if bld.env.NANOGL:
|
if bld.env.NANOGL:
|
||||||
bld.recurse('nanogl')
|
bld.recurse('nanogl')
|
||||||
bld.shlib(
|
bld.shlib(
|
||||||
source = source,
|
source = source,
|
||||||
target = 'ref_gles1',
|
target = 'ref_gles1',
|
||||||
features = 'c',
|
features = 'c',
|
||||||
includes = includes,
|
includes = includes,
|
||||||
use = libs + ['nanogl', 'DL' ],
|
use = libs + ['DL', 'nanogl'],
|
||||||
defines = ['XASH_GLES', 'XASH_NANOGL'],
|
defines = ['XASH_NANOGL'],
|
||||||
install_path = bld.env.LIBDIR,
|
install_path = bld.env.LIBDIR,
|
||||||
subsystem = bld.env.MSVC_SUBSYSTEM)
|
subsystem = bld.env.MSVC_SUBSYSTEM)
|
||||||
|
|
||||||
if bld.env.GLWES:
|
if bld.env.GLWES:
|
||||||
bld.recurse('gl-wes-v2')
|
bld.recurse('gl-wes-v2')
|
||||||
bld.shlib(
|
bld.shlib(
|
||||||
source = source,
|
source = source,
|
||||||
target = 'ref_gles2',
|
target = 'ref_gles2',
|
||||||
features = 'c',
|
features = 'c',
|
||||||
includes = includes,
|
includes = includes,
|
||||||
use = libs + ['gl-wes-v2', 'DL'],
|
use = libs + ['DL', 'gl-wes-v2'],
|
||||||
defines = ['XASH_GLES', 'XASH_WES'],
|
defines = ['XASH_WES'],
|
||||||
install_path = bld.env.LIBDIR,
|
install_path = bld.env.LIBDIR,
|
||||||
subsystem = bld.env.MSVC_SUBSYSTEM)
|
subsystem = bld.env.MSVC_SUBSYSTEM)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user