Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: About the mirror's two display modes  (Read 222 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
About the mirror's two display modes
« on: April 19, 2024, 07:41:19 PM »

The mirror, when available in certain planes, has two display settings; terrain/objects WITHOUT runway plates, and the more detailed setting that shows the runway plates in reflection. These days, does anyone using the mirror ever use the less detailed mode, selecting instead the second mode so as to see ghe runways too?

I hate cycling the extra step past a mode never used. More so when the cycling is in one direction only. (That's why, in my own game, I've eliminated two of the unwanted cockpit display modes.) In the old days, when the mirror functionality was added it made sense to offer a ''lite' mode that did not impact frame rates so much. For modern hardware, any  small difference in performance pretty much renders this concern moot.

For myself I'll see if I can eliminate the first mode,  resulting in a simple two-stage toggle between off and full display.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Re: About the mirror's two display modes
« Reply #1 on: April 19, 2024, 08:15:23 PM »

After a quick perusal of things, I see some complexity that would probably be beyond the abilities of this NARPTM. For one thing, the mirror involves loading and saving the ViewSet value in conf.ini. Among other multifarious interdependencies.

Perhaps a quick 'n dirty 'hack' would involve nothing more than making both display modes the same. In Main3D.doPreRender3D() we have the following. Fiddling with the four instances of Engine.drawEnv().preRender might do the trick...

Code: [Select]
    private void doPreRender3D(Render render)
    {
        render.useClearColor(!bDrawLand || (RenderContext.texGetFlags() & 0x20) != 0);
        ((Actor) (render.getCamera())).pos.getRender(__p, __o);
        if(!bRenderMirror && iRenderIndx == 0)
        {
            SearchlightGeneric.lightPlanesBySearchlights();
            Actor actor = ((Actor) (render.getCamera())).pos.base();
            if(Actor.isValid(actor))
            {
                actor.getSpeed(__v);
                Camera.SetTargetSpeed((float)((Tuple3d) (__v)).x, (float)((Tuple3d) (__v)).y, (float)((Tuple3d) (__v)).z);
            } else
            {
                Camera.SetTargetSpeed(0.0F, 0.0F, 0.0F);
            }
        }
        Render.enableFog(bEnableFog);
        if(bDrawClouds && super.clouds != null)
            super.clouds.preRender();
        if(bDrawLand)
            Engine.land().preRender((float)((Tuple3d) (__p)).z, false);
        DrwArray drwarray = bRenderMirror ? drwMirror : drwMaster[iRenderIndx];
        Engine.drawEnv().preRender(((Tuple3d) (__p)).x, ((Tuple3d) (__p)).y, ((Tuple3d) (__p)).z, World.MaxVisualDistance, 4, drwarray.drwSolid, drwarray.drwTransp, drwarray.drwShadow, true);
        Engine.drawEnv().preRender(((Tuple3d) (__p)).x, ((Tuple3d) (__p)).y, ((Tuple3d) (__p)).z, World.MaxLongVisualDistance, 8, drwarray.drwSolid, drwarray.drwTransp, drwarray.drwShadow, false);
        if(!bRenderMirror)
        {
            shadowPairsAdd(drwarray.drwSolid);
            shadowPairsAdd(drwarray.drwTransp);
        }
        if(!bRenderMirror || viewMirror > 1)
        {
            Engine.drawEnv().preRender(((Tuple3d) (__p)).x, ((Tuple3d) (__p)).y, ((Tuple3d) (__p)).z, World.MaxStaticVisualDistance, 2, drwarray.drwSolid, drwarray.drwTransp, drwarray.drwShadow, false);
            Engine.drawEnv().preRender(((Tuple3d) (__p)).x, ((Tuple3d) (__p)).y, ((Tuple3d) (__p)).z, World.MaxPlateVisualDistance, 1, drwarray.drwSolidPlate, drwarray.drwTranspPlate, drwarray.drwShadowPlate, true);
        }
        BulletGeneric.preRenderAll();
        if(bEnableFog)
            Render.enableFog(false);
    }
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Dimlee

  • member
  • Offline Offline
  • Posts: 1254
Re: About the mirror's two display modes
« Reply #2 on: April 20, 2024, 11:36:22 AM »

In the old days, I was a proponent of "full real" settings and used mirrors extensively on every aircraft where they were available (and I needed more! Hey, where were the mirrors on my Do 335...). Although my game PC has never been the most modern, I disliked that two-step procedure as it took a valuable second to switch on/off the mirror.
Today the "lite" mode is hardly needed, indeed.
If you manage to resolve the problem, it will remove the small but so annoying obstacle.
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Re: About the mirror's two display modes
« Reply #3 on: April 20, 2024, 04:07:51 PM »

A more accomplished code slinger than me could probably do this with one hand tied behind his back, one eye closed, and while half asleep. A proper treatment which reduces this to a proper 2-step toggle instead of the 3-step process it is now looks to be a potent, brain-straining challenge for my extremely meagre abilities. It appears to involve two or more classes to be altered, involving aspects and concepts deeper than I understand.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)
Pages: [1]   Go Up
 

Page created in 0.041 seconds with 25 queries.