diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c
index 504ded35b6bbea7bd899ff438ac237e07f56d9ac..72b78a985859bcb91155f1dc041cf15664003454 100644
--- a/src/hardware/hw_cache.c
+++ b/src/hardware/hw_cache.c
@@ -190,6 +190,7 @@ static void HWR_DrawPatchInCache(GLMipmap_t *mipmap,
 static void HWR_ResizeBlock(INT32 originalwidth, INT32 originalheight,
 	GrTexInfo *grInfo)
 {
+#ifdef GLIDE_API_COMPATIBILITY
 	//   Build the full textures from patches.
 	static const GrLOD_t gr_lods[9] =
 	{
@@ -226,6 +227,9 @@ static void HWR_ResizeBlock(INT32 originalwidth, INT32 originalheight,
 
 	INT32     j,k;
 	INT32     max,min;
+#else
+	(void)grInfo;
+#endif
 
 	// find a power of 2 width/height
 	if (cv_grrounddown.value)
@@ -281,6 +285,7 @@ static void HWR_ResizeBlock(INT32 originalwidth, INT32 originalheight,
 	}
 	else
 	{
+#ifdef GLIDE_API_COMPATIBILITY
 		//size up to nearest power of 2
 		blockwidth = 1;
 		while (blockwidth < originalwidth)
@@ -298,9 +303,14 @@ static void HWR_ResizeBlock(INT32 originalwidth, INT32 originalheight,
 		if (blockheight > 2048)
 			blockheight = 2048;
 			//I_Error("3D GenerateTexture : too big");
+#else
+		blockwidth = originalwidth;
+		blockheight = originalheight;
+#endif
 	}
 
 	// do the boring LOD stuff.. blech!
+#ifdef GLIDE_API_COMPATIBILITY
 	if (blockwidth >= blockheight)
 	{
 		max = blockwidth;
@@ -332,6 +342,7 @@ static void HWR_ResizeBlock(INT32 originalwidth, INT32 originalheight,
 	if (blockwidth < blockheight)
 		j += 4;
 	grInfo->aspectRatioLog2 = gr_aspects[j].aspect;
+#endif
 
 	blocksize = blockwidth * blockheight;
 
@@ -684,9 +695,11 @@ static void HWR_CacheFlat(GLMipmap_t *grMipmap, lumpnum_t flatlumpnum)
 	size_t size, pflatsize;
 
 	// setup the texture info
+#ifdef GLIDE_API_COMPATIBILITY
 	grMipmap->grInfo.smallLodLog2 = GR_LOD_LOG2_64;
 	grMipmap->grInfo.largeLodLog2 = GR_LOD_LOG2_64;
 	grMipmap->grInfo.aspectRatioLog2 = GR_ASPECT_LOG2_1x1;
+#endif
 	grMipmap->grInfo.format = GR_TEXFMT_P_8;
 	grMipmap->flags = TF_WRAPXY|TF_CHROMAKEYED;
 
@@ -753,9 +766,11 @@ void HWR_GetFlat(lumpnum_t flatlumpnum)
 static void HWR_LoadTextureFlat(GLMipmap_t *grMipmap, INT32 texturenum)
 {
 	// setup the texture info
+#ifdef GLIDE_API_COMPATIBILITY
 	grMipmap->grInfo.smallLodLog2 = GR_LOD_LOG2_64;
 	grMipmap->grInfo.largeLodLog2 = GR_LOD_LOG2_64;
 	grMipmap->grInfo.aspectRatioLog2 = GR_ASPECT_LOG2_1x1;
+#endif
 	grMipmap->grInfo.format = GR_TEXFMT_P_8;
 	grMipmap->flags = TF_WRAPXY|TF_CHROMAKEYED;
 
diff --git a/src/hardware/hw_glide.h b/src/hardware/hw_glide.h
index 2625d58640bbc26d62ea18ca156b8019aee2c9bf..bf91229efa1ccde01f73436079cc009a12aa62ac 100644
--- a/src/hardware/hw_glide.h
+++ b/src/hardware/hw_glide.h
@@ -59,9 +59,11 @@ typedef FxI32 GrTextureFormat_t;
 
 typedef struct
 {
+#ifdef GLIDE_API_COMPATIBILITY
 	GrLOD_t           smallLodLog2;
 	GrLOD_t           largeLodLog2;
 	GrAspectRatio_t   aspectRatioLog2;
+#endif
 	GrTextureFormat_t format;
 	void              *data;
 } GrTexInfo;
diff --git a/src/hardware/hw_light.c b/src/hardware/hw_light.c
index a93e96dc3d3e27ea2497b0230c90812ad363744f..23e8a34319dbb299e3ddd7cde9393cb7efa4e3f3 100644
--- a/src/hardware/hw_light.c
+++ b/src/hardware/hw_light.c
@@ -1112,9 +1112,11 @@ static void HWR_SetLight(void)
 		lightmappatch.height = 128;
 		lightmappatch.mipmap.width = 128;
 		lightmappatch.mipmap.height = 128;
+#ifdef GLIDE_API_COMPATIBILITY
 		lightmappatch.mipmap.grInfo.smallLodLog2 = GR_LOD_LOG2_128;
 		lightmappatch.mipmap.grInfo.largeLodLog2 = GR_LOD_LOG2_128;
 		lightmappatch.mipmap.grInfo.aspectRatioLog2 = GR_ASPECT_LOG2_1x1;
+#endif
 		lightmappatch.mipmap.flags = 0; //TF_WRAPXY; // DEBUG: view the overdraw !
 	}
 	HWD.pfnSetTexture(&lightmappatch.mipmap);
diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c
index cb33562d8b66260b9b3ee843333e25b27e93740c..e3ac82fa89b41165bcbc5a257ce1ccd8dc509c38 100644
--- a/src/hardware/hw_md2.c
+++ b/src/hardware/hw_md2.c
@@ -716,10 +716,12 @@ static void md2_loadTexture(md2_t *model)
 		grpatch->mipmap.width = (UINT16)w;
 		grpatch->mipmap.height = (UINT16)h;
 
+#ifdef GLIDE_API_COMPATIBILITY
 		// not correct!
 		grpatch->mipmap.grInfo.smallLodLog2 = GR_LOD_LOG2_256;
 		grpatch->mipmap.grInfo.largeLodLog2 = GR_LOD_LOG2_256;
 		grpatch->mipmap.grInfo.aspectRatioLog2 = GR_ASPECT_LOG2_1x1;
+#endif
 	}
 	HWD.pfnSetTexture(&grpatch->mipmap);
 	HWR_UnlockCachedPatch(grpatch);
@@ -767,10 +769,12 @@ static void md2_loadBlendTexture(md2_t *model)
 		grpatch->mipmap.width = (UINT16)w;
 		grpatch->mipmap.height = (UINT16)h;
 
+#ifdef GLIDE_API_COMPATIBILITY
 		// not correct!
 		grpatch->mipmap.grInfo.smallLodLog2 = GR_LOD_LOG2_256;
 		grpatch->mipmap.grInfo.largeLodLog2 = GR_LOD_LOG2_256;
 		grpatch->mipmap.grInfo.aspectRatioLog2 = GR_ASPECT_LOG2_1x1;
+#endif
 	}
 	HWD.pfnSetTexture(&grpatch->mipmap); // We do need to do this so that it can be cleared and knows to recreate it when necessary
 	HWR_UnlockCachedPatch(grpatch);