Added time variable from cl.time to realtime to support shaders when no game is running (menus)
This commit is contained in:
parent
4a36953820
commit
42c8a2cafa
5 changed files with 13 additions and 13 deletions
|
@ -937,11 +937,11 @@ void ARB_SetupTcMod(tcmod_t *tc)
|
|||
{
|
||||
case TCMOD_ROTATE:
|
||||
glTranslatef(0.5,0.5,0.0);
|
||||
glRotatef(cl.time * tc->params[0],0,0,1);
|
||||
glRotatef(realtime * tc->params[0],0,0,1);
|
||||
glTranslatef(-0.5, -0.5, 0.0);
|
||||
break;
|
||||
case TCMOD_SCROLL:
|
||||
glTranslatef(cl.time * tc->params[0], cl.time * tc->params[1], 0.0);
|
||||
glTranslatef(realtime * tc->params[0], realtime * tc->params[1], 0.0);
|
||||
break;
|
||||
case TCMOD_SCALE:
|
||||
glScalef(tc->params[0],tc->params[1],1.0);
|
||||
|
|
10
gl_bumpgf.c
10
gl_bumpgf.c
|
@ -75,7 +75,7 @@ void GL_EnableDiffuseShaderGF3(const transform_t *tr, const lightobject_t *lo, i
|
|||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
if (currentshadowlight->shader->numstages) {
|
||||
if (currentshadowlight->shader->stages[stageIndex].texture[0]->type == GL_TEXTURE_CUBE_MAP_ARB) {
|
||||
if (currentshadowlight->shader->stages[stageIndex].texture[0]->gltype == GL_TEXTURE_CUBE_MAP_ARB) {
|
||||
glEnable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, currentshadowlight->shader->stages[stageIndex].texture[0]->texnum);
|
||||
} else {
|
||||
|
@ -199,7 +199,7 @@ void GL_DisableDiffuseShaderGF3(int stageIndex) {
|
|||
|
||||
GL_SelectTexture(GL_TEXTURE3_ARB);
|
||||
if (currentshadowlight->shader->numstages) {
|
||||
if (currentshadowlight->shader->stages[stageIndex].texture[0]->type == GL_TEXTURE_CUBE_MAP_ARB)
|
||||
if (currentshadowlight->shader->stages[stageIndex].texture[0]->gltype == GL_TEXTURE_CUBE_MAP_ARB)
|
||||
glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
else
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
@ -240,7 +240,7 @@ void GL_EnableSpecularShaderGF3(const transform_t *tr, const lightobject_t *lo,
|
|||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
if (currentshadowlight->shader->numstages) {
|
||||
if (currentshadowlight->shader->stages[stageIndex].texture[0]->type == GL_TEXTURE_CUBE_MAP_ARB) {
|
||||
if (currentshadowlight->shader->stages[stageIndex].texture[0]->gltype == GL_TEXTURE_CUBE_MAP_ARB) {
|
||||
glEnable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, currentshadowlight->shader->stages[stageIndex].texture[0]->texnum);
|
||||
} else {
|
||||
|
@ -453,11 +453,11 @@ void GF3_SetupTcMod(tcmod_t *tc) {
|
|||
switch (tc->type) {
|
||||
case TCMOD_ROTATE:
|
||||
glTranslatef(0.5,0.5,0.0);
|
||||
glRotatef(cl.time * tc->params[0],0,0,1);
|
||||
glRotatef(realtime * tc->params[0],0,0,1);
|
||||
glTranslatef(-0.5, -0.5, 0.0);
|
||||
break;
|
||||
case TCMOD_SCROLL:
|
||||
glTranslatef(cl.time * tc->params[0], cl.time * tc->params[1], 0.0);
|
||||
glTranslatef(realtime * tc->params[0], realtime * tc->params[1], 0.0);
|
||||
break;
|
||||
case TCMOD_SCALE:
|
||||
glScalef(tc->params[0],tc->params[1],1.0);
|
||||
|
|
|
@ -570,11 +570,11 @@ void NV3x_SetupTcMod(tcmod_t *tc)
|
|||
{
|
||||
case TCMOD_ROTATE:
|
||||
glTranslatef(0.5,0.5,0.0);
|
||||
glRotatef(cl.time * tc->params[0],0,0,1);
|
||||
glRotatef(realtime * tc->params[0],0,0,1);
|
||||
glTranslatef(-0.5, -0.5, 0.0);
|
||||
break;
|
||||
case TCMOD_SCROLL:
|
||||
glTranslatef(cl.time * tc->params[0], cl.time * tc->params[1], 0.0);
|
||||
glTranslatef(realtime * tc->params[0], realtime * tc->params[1], 0.0);
|
||||
break;
|
||||
case TCMOD_SCALE:
|
||||
glScalef(tc->params[0],tc->params[1],1.0);
|
||||
|
|
|
@ -1105,11 +1105,11 @@ void Parhelia_SetupTcMod(tcmod_t *tc)
|
|||
{
|
||||
case TCMOD_ROTATE:
|
||||
glTranslatef(0.5,0.5,0.0);
|
||||
glRotatef(cl.time * tc->params[0],0,0,1);
|
||||
glRotatef(realtime * tc->params[0],0,0,1);
|
||||
glTranslatef(-0.5, -0.5, 0.0);
|
||||
break;
|
||||
case TCMOD_SCROLL:
|
||||
glTranslatef(cl.time * tc->params[0], cl.time * tc->params[1], 0.0);
|
||||
glTranslatef(realtime * tc->params[0], realtime * tc->params[1], 0.0);
|
||||
break;
|
||||
case TCMOD_SCALE:
|
||||
glScalef(tc->params[0],tc->params[1],1.0);
|
||||
|
|
|
@ -978,11 +978,11 @@ void Radeon_SetupTcMod(tcmod_t *tc)
|
|||
{
|
||||
case TCMOD_ROTATE:
|
||||
glTranslatef(0.5,0.5,0.0);
|
||||
glRotatef(cl.time * tc->params[0],0,0,1);
|
||||
glRotatef(realtime * tc->params[0],0,0,1);
|
||||
glTranslatef(-0.5, -0.5, 0.0);
|
||||
break;
|
||||
case TCMOD_SCROLL:
|
||||
glTranslatef(cl.time * tc->params[0], cl.time * tc->params[1], 0.0);
|
||||
glTranslatef(realtime * tc->params[0], realtime * tc->params[1], 0.0);
|
||||
break;
|
||||
case TCMOD_SCALE:
|
||||
glScalef(tc->params[0],tc->params[1],1.0);
|
||||
|
|
Loading…
Reference in a new issue