From: Charles L. <ch...@cn...> - 2009-08-18 16:08:28
|
This does not fix the problem for me. I did test it, though. I changed the line to: culled = mai.Culled( a.DoCullingTests( mai.GetOcclusionResult(), matrix ) ) && culled; I also ran a test program... (verified in GCC and VS 2k5): something_false = something_false && function(); << does not execute function versus something_false = function() && something_false; << does execute function My big question is on assets that are excluded from culls (m_excludeFromCull == true), there is no way for culled to be = false (in ::PreRender). And if you have an object that is excluded from culls, it and its node should definitely not be culled. A valid fix for this would be: if ( !a.ExcludeFromCull() ) culled = culled && mai.Culled( a.DoCullingTests( mai.GetOcclusionResult(), matrix ) ); else culled = false; The reason that now, everything shows up black without that is before Asset's m_excludeFromCull was not being set. This was masking the actual problem because many times it would contain trash (either excluded or not). Now, it is being set, so we run into the case described in the second paragraph every time. Charles Josh Allen wrote: > The fix isn't to completely break culling. What you did was to tell > nodes no matter what, always render every asset. > Anyway, I think I found and fixed the problem. I think GCC was doing > some stupid optimization here > > if ( !a.ExcludeFromCull() ) > culled = culled && mai.Culled( > a.DoCullingTests( mai.GetOcclusionResult(), matrix ) ); > > I think if culled was false then it skipped the && and the operations > after the &&. > > Try retesting. I can't get the problem to happen on my laptop. > > Josh > > > > > On Tue, Aug 18, 2009 at 9:28 AM, Charles Lohr <ch...@cn... > <mailto:ch...@cn...>> wrote: > > Well, something else is going on goofey then that this fixes, so it's > got to be very close to the right answer. As it stands, an arbitrary > number of textures will load. Some times, the ground texture will > load, > other times not. When you look into it further, it's because > arbitrarily the render on some of the texture assets will never > get run, > thus never loading the texture. In the event you have excluded > objects, > they need a way of preventing the culled flag from being set. > > I don't know what you have in mind to fix this, but it is definitely > broken as it is. > > Charles > > Josh wrote: > > No this is wrong. Auto excluding from cull is also wrong. > > Right now nothing is culled. > > The nonchanging VBO batches tells you this. > > > > > > > > cn...@us... > <mailto:cn...@us...> wrote: > > > >> Revision: 488 > >> > http://hgengine.svn.sourceforge.net/hgengine/?rev=488&view=rev > <http://hgengine.svn.sourceforge.net/hgengine/?rev=488&view=rev> > >> Author: cnlohr > >> Date: 2009-08-18 05:39:50 +0000 (Tue, 18 Aug 2009) > >> > >> Log Message: > >> ----------- > >> fix dissappearing textures and assets. The problem is that we're > >> ignoring if we're actually culled or not, and just letting whatever > >> happen. > >> > >> Modified Paths: > >> -------------- > >> Mercury2/src/MercuryNode.cpp > >> > >> Modified: Mercury2/src/MercuryNode.cpp > >> =================================================================== > >> --- Mercury2/src/MercuryNode.cpp 2009-08-18 05:24:42 UTC > (rev 487) > >> +++ Mercury2/src/MercuryNode.cpp 2009-08-18 05:39:50 UTC > (rev 488) > >> @@ -277,7 +277,11 @@ > >> MercuryAsset& a = mai.Asset(); > >> if ( !a.ExcludeFromCull() ) > >> culled = culled && mai.Culled( > a.DoCullingTests( mai.GetOcclusionResult(), matrix ) ); > >> - if ( !mai.Culled() ) a.PreRender(this); > >> + if ( !mai.Culled() ) > >> + { > >> + culled = false; > >> + a.PreRender(this); > >> + } > >> } > >> SetCulled( culled ); > >> } > >> > >> > >> This was sent by the SourceForge.net collaborative development > platform, the world's largest Open Source development site. > >> > >> > ------------------------------------------------------------------------------ > >> Let Crystal Reports handle the reporting - Free Crystal Reports > 2008 30-Day > >> trial. Simplify your report design, integration and deployment > - and focus on > >> what you do best, core application coding. Discover what's new with > >> Crystal Reports now. http://p.sf.net/sfu/bobj-july > >> _______________________________________________ > >> Hgengine-cvs mailing list > >> Hge...@li... > <mailto:Hge...@li...> > >> https://lists.sourceforge.net/lists/listinfo/hgengine-cvs > >> > >> > > > > > > > ------------------------------------------------------------------------------ > > Let Crystal Reports handle the reporting - Free Crystal Reports > 2008 30-Day > > trial. Simplify your report design, integration and deployment - > and focus on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Hgengine-devs mailing list > > Hge...@li... > <mailto:Hge...@li...> > > https://lists.sourceforge.net/lists/listinfo/hgengine-devs > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports > 2008 30-Day > trial. Simplify your report design, integration and deployment - > and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Hgengine-devs mailing list > Hge...@li... > <mailto:Hge...@li...> > https://lists.sourceforge.net/lists/listinfo/hgengine-devs > > > > > -- > http://www.stepmaniaonline.com > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ------------------------------------------------------------------------ > > _______________________________________________ > Hgengine-devs mailing list > Hge...@li... > https://lists.sourceforge.net/lists/listinfo/hgengine-devs > |