From: <baz...@us...> - 2008-02-11 09:36:11
|
Revision: 7853 http://armagetronad.svn.sourceforge.net/armagetronad/?rev=7853&view=rev Author: bazaarmagetron Date: 2008-02-11 01:36:16 -0800 (Mon, 11 Feb 2008) Log Message: ----------- Manuel Moos: Avoiding state changes when rendering rim walls (at least, when no moviepack is selected). Modified Paths: -------------- armagetronad/branches/0.2.8/armagetronad/src/engine/eAdvWall.h armagetronad/branches/0.2.8/armagetronad/src/engine/eDisplay.cpp armagetronad/branches/0.2.8/armagetronad/src/tron/gWall.cpp Property Changed: ---------------- armagetronad/branches/0.2.8/armagetronad/ Property changes on: armagetronad/branches/0.2.8/armagetronad ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-02-11 09:48:00.394000053 +0100 committer: Manuel Moos <z-...@us...> properties: branch-nick: armagetronad + timestamp: 2008-02-11 10:28:07.138999939 +0100 committer: Manuel Moos <z-...@us...> properties: branch-nick: armagetronad Name: bzr:revision-id:v3-list-QlpoOTFBWSZTWZvbKhsAAAdRgAAQABK6798QIABURMgAAaeoNT1TxT1DQbKaeobXKiyAmlWT7Y5MkdJOtXDtB7w7DOGFBHiOBxaUIu7HQyyQSvxdyRThQkJvbKhs - 538 z-...@us...-20080207163247-91eo4mrbiind6xrz 540 z-...@us...-20080208122252-nvhak6io6j0ui3aa 541 z-...@us...-20080208123045-76r9p0l7iwpbq1hy 542 z-...@us...-20080208124439-10s870zpb61b8buo 543 z-...@us...-20080208133845-a22a5j0z6vjgfaby 544 z-...@us...-20080208134134-bxi2z09linxnzl63 545 z-...@us...-20080208165812-xabnqfq34666e2z5 546 z-...@us...-20080208170201-jmubp7bm7lrpmw4z 551 z-...@us...-20080209115751-1w0yo2lwtv1xxmsc 552 z-...@us...-20080209121700-8mf9ure4bfaxtqfp 553 z-...@us...-20080209130301-0kw4jxjm7cvmbptp 561 z-...@us...-20080210002729-ee7t2nfh542nxksj 563 wrt...@us...-20080210153610-ucwvl013f1yil7og 564 z-...@us...-20080210212253-bxpkh4mtyisctr39 565 z-...@us...-20080211084800-j2c13scyxqc31m8x + 538 z-...@us...-20080207163247-91eo4mrbiind6xrz 540 z-...@us...-20080208122252-nvhak6io6j0ui3aa 541 z-...@us...-20080208123045-76r9p0l7iwpbq1hy 542 z-...@us...-20080208124439-10s870zpb61b8buo 543 z-...@us...-20080208133845-a22a5j0z6vjgfaby 544 z-...@us...-20080208134134-bxi2z09linxnzl63 545 z-...@us...-20080208165812-xabnqfq34666e2z5 546 z-...@us...-20080208170201-jmubp7bm7lrpmw4z 551 z-...@us...-20080209115751-1w0yo2lwtv1xxmsc 552 z-...@us...-20080209121700-8mf9ure4bfaxtqfp 553 z-...@us...-20080209130301-0kw4jxjm7cvmbptp 561 z-...@us...-20080210002729-ee7t2nfh542nxksj 563 wrt...@us...-20080210153610-ucwvl013f1yil7og 564 z-...@us...-20080210212253-bxpkh4mtyisctr39 565 z-...@us...-20080211084800-j2c13scyxqc31m8x 566 z-...@us...-20080211092807-gx4kehlz96356bpc Modified: armagetronad/branches/0.2.8/armagetronad/src/engine/eAdvWall.h =================================================================== --- armagetronad/branches/0.2.8/armagetronad/src/engine/eAdvWall.h 2008-02-11 08:53:45 UTC (rev 7852) +++ armagetronad/branches/0.2.8/armagetronad/src/engine/eAdvWall.h 2008-02-11 09:36:16 UTC (rev 7853) @@ -45,7 +45,6 @@ virtual bool Splittable() const; - // virtual void Split(eWall *& w1,eWall *& w2,REAL a); #ifndef DEDICATED Modified: armagetronad/branches/0.2.8/armagetronad/src/engine/eDisplay.cpp =================================================================== --- armagetronad/branches/0.2.8/armagetronad/src/engine/eDisplay.cpp 2008-02-11 08:53:45 UTC (rev 7852) +++ armagetronad/branches/0.2.8/armagetronad/src/engine/eDisplay.cpp 2008-02-11 09:36:16 UTC (rev 7853) @@ -293,6 +293,13 @@ glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); } +static bool se_RimWrapY=true; +static tSettingItem<bool> se_RimWrapYConf +("RIM_WALL_WRAP_Y",se_RimWrapY); + +static rFileTexture se_RimWallNoWrap(rTextureGroups::TEX_WALL,"textures/rim_wall.png",1,0); +static rFileTexture se_RimWallWrap(rTextureGroups::TEX_WALL,"textures/rim_wall.png",1,1); + void eGrid::display_simple( int viewer,bool floor, bool sr_upperSky,bool sr_lowerSky, REAL flooralpha, @@ -474,12 +481,22 @@ // glDisable(GL_TEXTURE_GEN_Q); // glDisable(GL_TEXTURE_GEN_R); - glEnable(GL_DEPTH_TEST); + if(eWalls){ + { + glEnable(GL_DEPTH_TEST); + glDisable(GL_CULL_FACE); - if(eWalls){ - for(int i=se_rimWalls.Len()-1;i>=0;i--){ - su_FetchAndStoreSDLInput(); - se_rimWalls(i)->RenderReal(cameras(viewer)); + if ( !sg_MoviePack() ) + { + ( se_RimWrapY ? se_RimWallWrap : se_RimWallNoWrap).Select(); + } + + for(int i=se_rimWalls.Len()-1;i>=0;i--){ + su_FetchAndStoreSDLInput(); + se_rimWalls(i)->RenderReal(cameras(viewer)); + } + + glEnable(GL_CULL_FACE); } if (sr_lowerSky && sr_highRim){ Modified: armagetronad/branches/0.2.8/armagetronad/src/tron/gWall.cpp =================================================================== --- armagetronad/branches/0.2.8/armagetronad/src/tron/gWall.cpp 2008-02-11 08:53:45 UTC (rev 7852) +++ armagetronad/branches/0.2.8/armagetronad/src/tron/gWall.cpp 2008-02-11 09:36:16 UTC (rev 7853) @@ -84,9 +84,6 @@ rFileTexture gWallRim_d(rTextureGroups::TEX_WALL, lala_mp_wallRimD, 0,0); */ -static rFileTexture sg_RimWallNoWrap(rTextureGroups::TEX_WALL,"textures/rim_wall.png",1,0); -static rFileTexture sg_RimWallWrap(rTextureGroups::TEX_WALL,"textures/rim_wall.png",1,1); - //static rTexture gWallRim_text_moviepack(rTEX_WALL,"moviepack/gWallRim2.png",1,0); static rFileTexture gWallRim_a(rTextureGroups::TEX_WALL,"moviepack/rim_wall_a.png",0,0); static rFileTexture gWallRim_b(rTextureGroups::TEX_WALL,"moviepack/rim_wall_b.png",0,0); @@ -113,9 +110,6 @@ static REAL sg_RimStretchY=100; static tSettingItem<REAL> sg_RimStretchYConf ("RIM_WALL_STRETCH_Y",sg_RimStretchY); -static bool sg_RimWrapY=true; -static tSettingItem<bool> sg_RimWrapYConf -("RIM_WALL_WRAP_Y",sg_RimWrapY); static REAL sg_MPRimStretchX=50; static tSettingItem<REAL> sg_MPRimStretchXConf @@ -271,9 +265,6 @@ const eCoord *p1=&EndPoint(0); const eCoord *p2=&EndPoint(1); - if (bf_cull) - glDisable(GL_CULL_FACE); - REAL X_SCALE=sg_RimStretchX; REAL Z_SCALE=sg_RimStretchY; @@ -283,7 +274,7 @@ if ( transparency ) glDisable( GL_DEPTH_TEST ); - if (sg_MoviePack()){ + if (sg_MoviePack()){ X_SCALE=sg_MPRimStretchX; Z_SCALE=sg_MPRimStretchY; } @@ -466,15 +457,11 @@ tBeg += offset; tEnd += offset; - ( sg_RimWrapY ? sg_RimWallWrap : sg_RimWallNoWrap).Select(); gWallRim_helper(*p1,*p2,tBeg,tEnd,h,Z_SCALE,false); } //eWall::Render_helper(edge,(p1->x+p1->y)/SCALE,(p2->x+p2->y)/SCALE,40,height); - - if (bf_cull) - glEnable(GL_CULL_FACE); - + if ( transparency ) glEnable( GL_DEPTH_TEST ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |