Home | History | Annotate | Download | only in jni

Lines Matching refs:surf

68 void R_AddDynamicLights (msurface_t *surf)
79 smax = (surf->extents[0]>>4)+1;
80 tmax = (surf->extents[1]>>4)+1;
81 tex = surf->texinfo;
85 if ( !(surf->dlightbits & (1<<lnum) ) )
89 dist = DotProduct (cl_dlights[lnum].origin, surf->plane->normal) -
90 surf->plane->dist;
100 surf->plane->normal[i]*dist;
106 local[0] -= surf->texturemins[0];
107 local[1] -= surf->texturemins[1];
138 void R_BuildLightMap (msurface_t *surf, byte *dest, int stride)
149 surf->cached_dlight = (surf->dlightframe == r_framecount);
151 smax = (surf->extents[0]>>4)+1;
152 tmax = (surf->extents[1]>>4)+1;
154 lightmap = surf->samples;
170 for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
173 scale = d_lightstylevalue[surf->styles[maps]];
174 surf->cached_light[maps] = scale; // 8.8 fraction
181 if (surf->dlightframe == r_framecount)
182 R_AddDynamicLights (surf);
1292 msurface_t *surf, **mark;
1363 surf = cl.worldmodel->surfaces + node->firstsurface;
1370 for ( ; c ; c--, surf++)
1372 if (surf->visframe != r_framecount)
1376 if ( !(surf->flags & SURF_UNDERWATER) && ( (dot < 0) ^ !!(surf->flags & SURF_PLANEBACK)) )
1383 || surf->texinfo->texture != cl.worldmodel->textures[mirrortexturenum])
1385 surf->texturechain = surf->texinfo->texture->texturechain;
1386 surf->texinfo->texture->texturechain = surf;
1388 } else if (surf->flags & SURF_DRAWSKY) {
1389 surf->texturechain = skychain;
1390 skychain = surf;
1391 } else if (surf->flags & SURF_DRAWTURB) {
1392 surf->texturechain = waterchain;
1393 waterchain = surf;
1395 R_DrawSequentialPoly (surf);
1673 void GL_CreateSurfaceLightmap (msurface_t *surf)
1678 if (surf->flags & (SURF_DRAWSKY|SURF_DRAWTURB))
1681 smax = (surf->extents[0]>>4)+1;
1682 tmax = (surf->extents[1]>>4)+1;
1684 surf->lightmaptexturenum = AllocBlock (smax, tmax, &surf->light_s, &surf->light_t);
1685 base = lightmaps + surf->lightmaptexturenum*lightmap_bytes*BLOCK_WIDTH*BLOCK_HEIGHT;
1686 base += (surf->light_t * BLOCK_WIDTH + surf->light_s) * lightmap_bytes;
1687 R_BuildLightMap (surf, base, BLOCK_WIDTH*lightmap_bytes);