fix some csqc.
give up with glsl+bones+emscripten. emscripten just prevents it from being viable. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4856 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
21d6185e26
commit
f60069e8e8
2 changed files with 23 additions and 16 deletions
|
@ -4156,6 +4156,20 @@ float csqcdelta_time;
|
||||||
|
|
||||||
static csqcedict_t *csqcdelta_playerents[MAX_CLIENTS];
|
static csqcedict_t *csqcdelta_playerents[MAX_CLIENTS];
|
||||||
|
|
||||||
|
static void CSQC_EntRemove(csqcedict_t *ed)
|
||||||
|
{
|
||||||
|
if (csqcg.ent_remove)
|
||||||
|
{
|
||||||
|
*csqcg.self = EDICT_TO_PROG(csqcprogs, ed);
|
||||||
|
PR_ExecuteProgram(csqcprogs, csqcg.ent_remove);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pe->DelinkTrailstate(&ed->trailstate);
|
||||||
|
World_UnlinkEdict((wedict_t*)ed);
|
||||||
|
ED_Free (csqcprogs, (void*)ed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
qboolean CSQC_DeltaPlayer(int playernum, player_state_t *state)
|
qboolean CSQC_DeltaPlayer(int playernum, player_state_t *state)
|
||||||
{
|
{
|
||||||
|
@ -4217,20 +4231,6 @@ void CSQC_DeltaStart(float time)
|
||||||
csqcdelta_pack_new.readpos = 0;
|
csqcdelta_pack_new.readpos = 0;
|
||||||
csqcdelta_pack_old.readpos = 0;
|
csqcdelta_pack_old.readpos = 0;
|
||||||
}
|
}
|
||||||
static CSQC_EntRemove(csqcedict_t *ed)
|
|
||||||
{
|
|
||||||
if (csqcg.ent_remove)
|
|
||||||
{
|
|
||||||
*csqcg.self = EDICT_TO_PROG(csqcprogs, ed);
|
|
||||||
PR_ExecuteProgram(csqcprogs, csqcg.ent_remove);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pe->DelinkTrailstate(&ed->trailstate);
|
|
||||||
World_UnlinkEdict((wedict_t*)ed);
|
|
||||||
ED_Free (csqcprogs, (void*)ed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
qboolean CSQC_DeltaUpdate(entity_state_t *src)
|
qboolean CSQC_DeltaUpdate(entity_state_t *src)
|
||||||
{
|
{
|
||||||
//FTE ensures that this function is called with increasing ent numbers each time
|
//FTE ensures that this function is called with increasing ent numbers each time
|
||||||
|
|
|
@ -1930,7 +1930,7 @@ static GLhandleARB GLSlang_FinishShader(GLhandleARB shader, const char *name, GL
|
||||||
unsigned int line;
|
unsigned int line;
|
||||||
char *eol, *start;
|
char *eol, *start;
|
||||||
qglGetShaderSource(shader, sizeof(str), NULL, str);
|
qglGetShaderSource(shader, sizeof(str), NULL, str);
|
||||||
Con_Printf("Shader \"%s\" source:\n", name, str);
|
Con_Printf("Shader \"%s\" source:\n", name);
|
||||||
for(start = str, line = 1; ;line++)
|
for(start = str, line = 1; ;line++)
|
||||||
{
|
{
|
||||||
eol = strchr(start, '\n');
|
eol = strchr(start, '\n');
|
||||||
|
@ -2005,7 +2005,6 @@ GLhandleARB GLSlang_CreateProgramObject (const char *name, GLhandleARB vert, GLh
|
||||||
qboolean GLSlang_ValidateProgram(union programhandle_u *h, const char *name, qboolean silent, vfsfile_t *blobfile)
|
qboolean GLSlang_ValidateProgram(union programhandle_u *h, const char *name, qboolean silent, vfsfile_t *blobfile)
|
||||||
{
|
{
|
||||||
char str[2048];
|
char str[2048];
|
||||||
char *nullconstants = NULL;
|
|
||||||
GLint linked;
|
GLint linked;
|
||||||
|
|
||||||
if (!h->glsl.handle)
|
if (!h->glsl.handle)
|
||||||
|
@ -2126,6 +2125,14 @@ qboolean GLSlang_ValidateProgramPermu(program_t *prog, const char *name, unsigne
|
||||||
}
|
}
|
||||||
qboolean GLSlang_CreateProgramPermu(program_t *prog, const char *name, unsigned int permu, int ver, const char **precompilerconstants, const char *vert, const char *tcs, const char *tes, const char *frag, qboolean noerrors, vfsfile_t *blobfile)
|
qboolean GLSlang_CreateProgramPermu(program_t *prog, const char *name, unsigned int permu, int ver, const char **precompilerconstants, const char *vert, const char *tcs, const char *tes, const char *frag, qboolean noerrors, vfsfile_t *blobfile)
|
||||||
{
|
{
|
||||||
|
#ifdef FTE_TARGET_WEB
|
||||||
|
//emscripten's uniform code results in excessive stalls that hinder usability.
|
||||||
|
//the uniforms required for bones basically turn it into a DOS attack.
|
||||||
|
//so lets just do all the work inside javascript instead... (oh god this is going to be painful)
|
||||||
|
if (permu & PERMUTATION_SKELETAL)
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!ver)
|
if (!ver)
|
||||||
{
|
{
|
||||||
ver = gl_config.gles?100:110;
|
ver = gl_config.gles?100:110;
|
||||||
|
|
Loading…
Reference in a new issue