+ else
+ glt->inputtexels = NULL;
+
+ R_FindImageForTexture(glt);
+ R_PrecacheTexture(glt);
+
+ return (rtexture_t *)glt;
+}
+
+rtexture_t *R_LoadTexture1D(rtexturepool_t *rtexturepool, const char *identifier, int width, const qbyte *data, int textype, int flags, const unsigned int *palette)
+{
+ return R_SetupTexture(rtexturepool, identifier, width, 1, 1, 1, flags, textype, GLTEXTURETYPE_1D, data, palette);
+}
+
+rtexture_t *R_LoadTexture2D(rtexturepool_t *rtexturepool, const char *identifier, int width, int height, const qbyte *data, int textype, int flags, const unsigned int *palette)
+{
+ return R_SetupTexture(rtexturepool, identifier, width, height, 1, 1, flags, textype, GLTEXTURETYPE_2D, data, palette);
+}
+
+rtexture_t *R_LoadTexture3D(rtexturepool_t *rtexturepool, const char *identifier, int width, int height, int depth, const qbyte *data, int textype, int flags, const unsigned int *palette)
+{
+ return R_SetupTexture(rtexturepool, identifier, width, height, depth, 1, flags, textype, GLTEXTURETYPE_3D, data, palette);
+}
+
+rtexture_t *R_LoadTextureCubeMap(rtexturepool_t *rtexturepool, const char *identifier, int width, const qbyte *data, int textype, int flags, const unsigned int *palette)
+{
+ return R_SetupTexture(rtexturepool, identifier, width, width, 1, 6, flags, textype, GLTEXTURETYPE_CUBEMAP, data, palette);
+}
+
+int R_TextureHasAlpha(rtexture_t *rt)
+{
+ return rt ? (((gltexture_t *)rt)->flags & TEXF_ALPHA) != 0 : false;
+}
+
+int R_TextureWidth(rtexture_t *rt)
+{
+ return rt ? ((gltexture_t *)rt)->width : 0;
+}
+
+int R_TextureHeight(rtexture_t *rt)
+{
+ 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)