Make plugins more robust with regard to different build configs.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6119 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
d4bd64980f
commit
39add9730f
9 changed files with 21 additions and 5 deletions
|
@ -1077,7 +1077,7 @@ else
|
|||
M_LDFLAGS=$(MLDFLAGS) $(IMAGELDFLAGS) `$(SDLCONFIG) --libs`
|
||||
SV_LDFLAGS=`$(SDLCONFIG) --libs`
|
||||
endif
|
||||
GL_CFLAGS=-DFTE_SDL $(GLCFLAGS) -DMLTITHREAD `$(SDLCONFIG) --cflags`
|
||||
GL_CFLAGS=-DFTE_SDL $(GLCFLAGS) -DMULTITHREAD `$(SDLCONFIG) --cflags`
|
||||
GLB_DIR=gl_$(FTE_FULLTARGET)
|
||||
GLCL_DIR=glcl_$(FTE_FULLTARGET)
|
||||
SV_DIR?=sv_$(FTE_FULLTARGET)
|
||||
|
@ -1101,7 +1101,7 @@ MCL_DIR=mcl_$(FTE_FULLTARGET)
|
|||
M_EXE_NAME=../$(EXE_NAME)-$(FTE_FULLTARGET)
|
||||
MCL_EXE_NAME=../$(EXE_NAME)-cl$(FTE_FULLTARGET)
|
||||
MCL_OBJS=$(D3DGL_OBJS) $(GLQUAKE_OBJS) $(SOFTWARE_OBJS) $(BOTLIB_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o
|
||||
M_CFLAGS=-DFTE_SDL $(VKCFLAGS) $(GLCFLAGS) -DMULTITHRED `$(SDLCONFIG) --cflags`
|
||||
M_CFLAGS=-DFTE_SDL $(VKCFLAGS) $(GLCFLAGS) -DMULTITHREAD `$(SDLCONFIG) --cflags`
|
||||
|
||||
QCC_DIR=qcc$(BITS)
|
||||
|
||||
|
|
|
@ -43,8 +43,12 @@ static const texid_t r_nulltex = NULL;
|
|||
//desktop-gl will generally cope with ints, but expect a performance hit from that with old gpus (so we don't bother)
|
||||
//vulkan+dx10 can cope with ints, but might be 24bit
|
||||
//either way, all renderers in the same build need to use the same thing.
|
||||
#if (defined(GLQUAKE) && defined(HAVE_LEGACY)) || defined(MINIMAL) || defined(D3D8QUAKE) || defined(D3D9QUAKE) || defined(ANDROID) || defined(FTE_TARGET_WEB)
|
||||
#define sizeof_index_t 2
|
||||
#ifndef sizeof_index_t
|
||||
#ifdef VERTEXINDEXBYTES //maybe set in config_*.h
|
||||
#define sizeof_index_t VERTEXINDEXBYTES
|
||||
#elif (defined(GLQUAKE) && defined(HAVE_LEGACY)) || defined(MINIMAL) || defined(D3D8QUAKE) || defined(D3D9QUAKE) || defined(ANDROID) || defined(FTE_TARGET_WEB)
|
||||
#define sizeof_index_t 2
|
||||
#endif
|
||||
#endif
|
||||
#if sizeof_index_t == 2
|
||||
#define GL_INDEX_TYPE GL_UNSIGNED_SHORT
|
||||
|
@ -54,6 +58,8 @@ static const texid_t r_nulltex = NULL;
|
|||
typedef unsigned short index_t;
|
||||
#define MAX_INDICIES 0xffffu
|
||||
#else
|
||||
#undef sizeof_index_t
|
||||
#define sizeof_index_t 4
|
||||
#define GL_INDEX_TYPE GL_UNSIGNED_INT
|
||||
#define D3DFMT_QINDEX D3DFMT_INDEX32
|
||||
#define DXGI_FORMAT_INDEX_UINT DXGI_FORMAT_R32_UINT
|
||||
|
|
|
@ -264,7 +264,11 @@ typedef struct modplugfuncs_s
|
|||
void (*RenderDynamicLightmaps) (struct msurface_s *surf);
|
||||
entity_t *(*NewSceneEntity) (void);
|
||||
void (*EndSubmodelLoad)(struct model_s *submod, int modelloadstate);
|
||||
#define plugmodfuncs_name "Models"
|
||||
#if sizeof_index_t==2
|
||||
#define plugmodfuncs_name "Models"
|
||||
#else
|
||||
#define plugmodfuncs_name "Models_IDX" STRINGIFY(sizeof_index_t)
|
||||
#endif
|
||||
} plugmodfuncs_t;
|
||||
#define MODPLUGFUNCS_VERSION 2
|
||||
|
||||
|
|
|
@ -157,6 +157,7 @@
|
|||
#undef HAVE_SPEECHTOTEXT //windows speech-to-text thing
|
||||
|
||||
//FIXME: Stuff that Spike has added that Eukara needs to decide whether to keep or not.
|
||||
#define VERTEXINDEXBYTES 2 //16bit indexes work everywhere but may break some file types, 32bit indexes are optional in gles<=2 and d3d<=9 and take more memory/copying but allow for bigger batches/models. Plugins need to be compiled the same way so this is no longer set per-renderer.
|
||||
#define HAVE_OPUS
|
||||
//#define HAVE_SPEEX
|
||||
//#define IMAGEFMT_HDR
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#define AVAIL_DINPUT
|
||||
#define SIDEVIEWS 4 //enable secondary/reverse views.
|
||||
#define MAX_SPLITS 4u
|
||||
#define VERTEXINDEXBYTES 2 //16bit indexes work everywhere but may break some file types, 32bit indexes are optional in gles<=2 and d3d<=9 and take more memory/copying but allow for bigger batches/models. Plugins need to be compiled the same way so this is no longer set per-renderer.
|
||||
#define TEXTEDITOR //my funky text editor! its awesome!
|
||||
#define PLUGINS //support for external plugins (like huds or fancy menus or whatever)
|
||||
#define USE_SQLITE //sql-database-as-file support
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#define AVAIL_DINPUT
|
||||
//#define SIDEVIEWS 4 //enable secondary/reverse views.
|
||||
//#define MAX_SPLITS 4u
|
||||
#define VERTEXINDEXBYTES 2 //16bit indexes work everywhere but may break some file types, 32bit indexes are optional in gles<=2 and d3d<=9 and take more memory/copying but allow for bigger batches/models. Plugins need to be compiled the same way so this is no longer set per-renderer.
|
||||
//#define TEXTEDITOR //my funky text editor! its awesome!
|
||||
//#define PLUGINS //support for external plugins (like huds or fancy menus or whatever)
|
||||
//#define USE_SQLITE //sql-database-as-file support
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#define AVAIL_DINPUT
|
||||
//#define SIDEVIEWS 4 //enable secondary/reverse views.
|
||||
#define MAX_SPLITS 4u
|
||||
#define VERTEXINDEXBYTES 2 //16bit indexes work everywhere but may break some file types, 32bit indexes are optional in gles<=2 and d3d<=9 and take more memory/copying but allow for bigger batches/models. Plugins need to be compiled the same way so this is no longer set per-renderer.
|
||||
//#define TEXTEDITOR //my funky text editor! its awesome!
|
||||
#define PLUGINS //support for external plugins (like huds or fancy menus or whatever)
|
||||
//#define USE_SQLITE //sql-database-as-file support
|
||||
|
|
|
@ -105,6 +105,7 @@
|
|||
#undef MAP_PROC
|
||||
#undef Q2BSPS
|
||||
#define RFBSPS
|
||||
#define VERTEXINDEXBYTES 2 //16bit indexes work everywhere but may break some file types, 32bit indexes are optional in gles<=2 and d3d<=9 and take more memory/copying but allow for bigger batches/models. Plugins need to be compiled the same way so this is no longer set per-renderer.
|
||||
#undef SPRMODELS
|
||||
#undef SP2MODELS
|
||||
#undef DSPMODELS
|
||||
|
|
|
@ -2138,6 +2138,7 @@ static void *QDECL PlugBI_GetEngineInterface(const char *interfacename, size_t s
|
|||
return menu_world.progs;
|
||||
}
|
||||
#endif
|
||||
Con_DPrintf("Plugin %s requested interface %s#%x, but its unavailable.\n", currentplug?currentplug->filename:"UNKNOWN", interfacename, (unsigned int)structsize);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue