return ((gltexture_t *)rt)->height;
}
-void R_GetFragmentLocation(rtexture_t *rt, int *x, int *y, float *fx1, float *fy1, float *fx2, float *fy2)
+void R_FragmentLocation(rtexture_t *rt, int *x, int *y, float *fx1, float *fy1, float *fx2, float *fy2)
{
gltexture_t *glt;
float iwidth, iheight;
return;
}
if (!rt)
- Host_Error("R_GetFragmentLocation: no texture supplied\n");
+ Host_Error("R_FragmentLocation: no texture supplied\n");
glt = (gltexture_t *)rt;
if (glt->flags & TEXF_FRAGMENT)
{
}
// surf->lightmaptexture = R_LoadTexture(loadmodel->texturepool, va("lightmap%08x", lightmapnum), surf->lightmaptexturestride, (surf->extents[1]>>4)+1, NULL, loadmodel->lightmaprgba ? TEXTYPE_RGBA : TEXTYPE_RGB, TEXF_FRAGMENT | TEXF_PRECACHE);
// surf->lightmaptexture = R_LoadTexture(loadmodel->texturepool, va("lightmap%08x", lightmapnum), surf->lightmaptexturestride, (surf->extents[1]>>4)+1, NULL, loadmodel->lightmaprgba ? TEXTYPE_RGBA : TEXTYPE_RGB, TEXF_PRECACHE);
- R_GetFragmentLocation(surf->lightmaptexture, NULL, NULL, &xbase, &ybase, &xscale, &yscale);
+ R_FragmentLocation(surf->lightmaptexture, NULL, NULL, &xbase, &ybase, &xscale, &yscale);
xscale = (xscale - xbase) * 16.0 / ((surf->extents[0] & ~15) + 16);
yscale = (yscale - ybase) * 16.0 / ((surf->extents[1] & ~15) + 16);
void R_UpdateTexture(rtexture_t *rt, byte *data);
// location of the fragment in the texture (note: any parameter except rt can be NULL)
-void R_GetFragmentLocation(rtexture_t *rt, int *x, int *y, float *fx1, float *fy1, float *fx2, float *fy2);
+void R_FragmentLocation(rtexture_t *rt, int *x, int *y, float *fx1, float *fy1, float *fx2, float *fy2);
// returns the renderer dependent texture slot number (call this before each use, as a texture might not have been precached, or it might change over time if it is procedural)
int R_GetTexture (rtexture_t *rt);