View Issue Details

IDProjectCategoryView StatusLast Update
0003868The Dark ModCodingpublic05.03.2017 07:25
Reportertels Assigned Toduzenko  
PrioritylowSeveritytweakReproducibilityN/A
Status resolvedResolutionfixed 
Product VersionTDM 2.02 
Fixed in VersionTDM 2.06 
Summary0003868: Remove dead code (GLASSWARP) in draw_common
DescriptionDiscussion and patch:

http://forums.thedarkmod.com/topic/15178-tdm-engine-development-page/page__view__findpost__p__355558
TagsNo tags attached.
Attached Files
tels_patch_k_remove_glasswarp_2014-10-04.txt (3,489 bytes)   
Index: renderer/Material.h
===================================================================
--- renderer/Material.h	(revision 6118)
+++ renderer/Material.h	(working copy)
@@ -143,8 +143,7 @@
 	TG_SKYBOX_CUBE,
 	TG_WOBBLESKY_CUBE,
 	TG_SCREEN,			// screen aligned, for mirrorRenders and screen space temporaries
-	TG_SCREEN2,
-	TG_GLASSWARP
+	TG_SCREEN2
 } texgen_t;
 
 typedef struct {
Index: renderer/tr_local.h
===================================================================
--- renderer/tr_local.h	(revision 6118)
+++ renderer/tr_local.h	(working copy)
@@ -1337,8 +1337,6 @@
 	FPROG_TEST,
 	VPROG_AMBIENT,
 	FPROG_AMBIENT,
-	VPROG_GLASSWARP,
-	FPROG_GLASSWARP,
 	// rebb: direct light interactions, related to r_dedicatedAmbient
 	VPROG_TEST_DIRECT,
 	FPROG_TEST_DIRECT,
Index: renderer/draw_common.cpp
===================================================================
--- renderer/draw_common.cpp	(revision 6118)
+++ renderer/draw_common.cpp	(working copy)
@@ -143,46 +143,6 @@
 		qglTexGenfv( GL_Q, GL_OBJECT_PLANE, plane );
 	}
 
-	if ( pStage->texture.texgen == TG_GLASSWARP ) {
-		if ( tr.backEndRenderer == BE_ARB2 /*|| tr.backEndRenderer == BE_NV30*/ ) {
-			qglBindProgramARB( GL_FRAGMENT_PROGRAM_ARB, FPROG_GLASSWARP );
-			qglEnable( GL_FRAGMENT_PROGRAM_ARB );
-
-			GL_SelectTexture( 2 );
-			globalImages->scratchImage->Bind();
-
-			GL_SelectTexture( 1 );
-			globalImages->scratchImage2->Bind();
-
-			qglEnable( GL_TEXTURE_GEN_S );
-			qglEnable( GL_TEXTURE_GEN_T );
-			qglEnable( GL_TEXTURE_GEN_Q );
-
-			float	mat[16], plane[4];
-			myGlMultMatrix( surf->space->modelViewMatrix, backEnd.viewDef->projectionMatrix, mat );
-
-			plane[0] = mat[0];
-			plane[1] = mat[4];
-			plane[2] = mat[8];
-			plane[3] = mat[12];
-			qglTexGenfv( GL_S, GL_OBJECT_PLANE, plane );
-
-			plane[0] = mat[1];
-			plane[1] = mat[5];
-			plane[2] = mat[9];
-			plane[3] = mat[13];
-			qglTexGenfv( GL_T, GL_OBJECT_PLANE, plane );
-
-			plane[0] = mat[3];
-			plane[1] = mat[7];
-			plane[2] = mat[11];
-			plane[3] = mat[15];
-			qglTexGenfv( GL_Q, GL_OBJECT_PLANE, plane );
-
-			GL_SelectTexture( 0 );
-		}
-	}
-
 	if ( pStage->texture.texgen == TG_REFLECT_CUBE ) {
 		if ( tr.backEndRenderer == BE_ARB2 ) {
 			// see if there is also a bump map specified
@@ -265,24 +225,6 @@
 		qglDisable( GL_TEXTURE_GEN_Q );
 	}
 
-	if ( pStage->texture.texgen == TG_GLASSWARP ) {
-		if ( tr.backEndRenderer == BE_ARB2 /*|| tr.backEndRenderer == BE_NV30*/ ) {
-			GL_SelectTexture( 2 );
-			globalImages->BindNull();
-
-			GL_SelectTexture( 1 );
-			if ( pStage->texture.hasMatrix ) {
-				RB_LoadShaderTextureMatrix( surf->shaderRegisters, &pStage->texture );
-			}
-			qglDisable( GL_TEXTURE_GEN_S );
-			qglDisable( GL_TEXTURE_GEN_T );
-			qglDisable( GL_TEXTURE_GEN_Q );
-			qglDisable( GL_FRAGMENT_PROGRAM_ARB );
-			globalImages->BindNull();
-			GL_SelectTexture( 0 );
-		}
-	}
-
 	if ( pStage->texture.texgen == TG_REFLECT_CUBE ) {
 		if ( tr.backEndRenderer == BE_ARB2 ) {
 			// see if there is also a bump map specified
Index: renderer/Material.cpp
===================================================================
--- renderer/Material.cpp	(revision 6118)
+++ renderer/Material.cpp	(working copy)
@@ -1163,10 +1163,6 @@
 			ts->texgen = TG_SCREEN2;
 			continue;
 		}
-		else if (  !token.Icmp( "glassWarp" ) ) {
-			ts->texgen = TG_GLASSWARP;
-			continue;
-		}
 
 		else if ( !token.Icmp( "videomap" ) ) {
 			// note that videomaps will always be in clamp mode, so texture

Activities

duzenko

duzenko

05.03.2017 07:24

developer   ~0008758

Last edited: 05.03.2017 07:25

Svn rev 6762.
Commented out for now. To be removed completely later.

Issue History

Date Modified Username Field Change
05.10.2014 13:51 tels New Issue
05.10.2014 13:51 tels Status new => assigned
05.10.2014 13:51 tels Assigned To => SteveL
05.10.2014 13:55 tels File Added: tels_patch_n_remove_dead_code_2014-10-04.txt
05.10.2014 16:35 tels File Deleted: tels_patch_n_remove_dead_code_2014-10-04.txt
05.10.2014 16:35 tels File Added: tels_patch_k_remove_glasswarp_2014-10-04.txt
15.02.2017 04:40 grayman Assigned To SteveL =>
15.02.2017 04:40 grayman Status assigned => new
05.03.2017 07:08 duzenko Assigned To => duzenko
05.03.2017 07:08 duzenko Status new => assigned
05.03.2017 07:24 duzenko Note Added: 0008758
05.03.2017 07:24 duzenko Status assigned => resolved
05.03.2017 07:24 duzenko Fixed in Version => TDM 2.06
05.03.2017 07:24 duzenko Resolution open => fixed
05.03.2017 07:25 duzenko Note Edited: 0008758