- return rt ? ((gltexture_t *)rt)->height : 0;
-}
-
-void R_FragmentLocation3D(rtexture_t *rt, int *x, int *y, int *z, float *fx1, float *fy1, float *fz1, float *fx2, float *fy2, float *fz2)
-{
- gltexture_t *glt;
- float iwidth, iheight, idepth;
- if (cls.state == ca_dedicated)
- {
- if (x)
- *x = 0;
- if (y)
- *y = 0;
- if (z)
- *z = 0;
- if (fx1 || fy1 || fx2 || fy2)
- {
- if (fx1)
- *fx1 = 0;
- if (fy1)
- *fy1 = 0;
- if (fz1)
- *fz1 = 0;
- if (fx2)
- *fx2 = 1;
- if (fy2)
- *fy2 = 1;
- if (fz2)
- *fz2 = 1;
- }
- return;
- }
- if (!rt)
- Host_Error("R_FragmentLocation: no texture supplied\n");
- glt = (gltexture_t *)rt;
- if (glt->flags & TEXF_FRAGMENT)
- {
- if (x)
- *x = glt->x;
- if (y)
- *y = glt->y;
- if (fx1 || fy1 || fx2 || fy2)
- {
- iwidth = 1.0f / glt->image->width;
- iheight = 1.0f / glt->image->height;
- idepth = 1.0f / glt->image->depth;
- if (fx1)
- *fx1 = glt->x * iwidth;
- if (fy1)
- *fy1 = glt->y * iheight;
- if (fz1)
- *fz1 = glt->z * idepth;
- if (fx2)
- *fx2 = (glt->x + glt->width) * iwidth;
- if (fy2)
- *fy2 = (glt->y + glt->height) * iheight;
- if (fz2)
- *fz2 = (glt->z + glt->depth) * idepth;
- }
- }
- else
- {
- if (x)
- *x = 0;
- if (y)
- *y = 0;
- if (z)
- *z = 0;
- if (fx1 || fy1 || fx2 || fy2)
- {
- if (fx1)
- *fx1 = 0;
- if (fy1)
- *fy1 = 0;
- if (fz1)
- *fz1 = 0;
- if (fx2)
- *fx2 = 1;
- if (fy2)
- *fy2 = 1;
- if (fz2)
- *fz2 = 1;
- }
- }
-}
-
-void R_FragmentLocation(rtexture_t *rt, int *x, int *y, float *fx1, float *fy1, float *fx2, float *fy2)
-{
- R_FragmentLocation3D(rt, x, y, NULL, fx1, fy1, NULL, fx2, fy2, NULL);
-}
-
-int R_CompatibleFragmentWidth(int width, int textype, int flags)
-{
- return width;