Пример #1
0
        /// <summary>
        /// EmitBothSkyLayers
        /// Does a sky warp on the pre-fragmented glpoly_t chain
        /// This will be called for brushmodels, the world
        /// will have them chained together.
        /// </summary>
        public void EmitBothSkyLayers(Double realTime, Vector3 origin, MemorySurface fa)
        {
            Device.DisableMultitexture( );

            SolidSkyTexture.Bind( );
            SpeedScale  = ( Single )realTime * 8;
            SpeedScale -= ( Int32 )SpeedScale & ~127;

            Device.Graphics.EmitSkyPolys(fa.polys, origin, SpeedScale);

            AlphaSkyTexture.Bind( );
            SpeedScale  = ( Single )realTime * 16;
            SpeedScale -= ( Int32 )SpeedScale & ~127;

            Device.Graphics.EmitSkyPolys(fa.polys, origin, SpeedScale, true);
        }
Пример #2
0
        /// <summary>
        /// R_DrawSkyChain
        /// </summary>
        public void DrawSkyChain(Double realTime, Vector3 origin, MemorySurface s)
        {
            Device.DisableMultitexture( );

            SolidSkyTexture.Bind( );

            // used when gl_texsort is on
            SpeedScale  = ( Single )realTime * 8;
            SpeedScale -= ( Int32 )SpeedScale & ~127;

            for (var fa = s; fa != null; fa = fa.texturechain)
            {
                Device.Graphics.EmitSkyPolys(fa.polys, origin, SpeedScale);
            }

            AlphaSkyTexture.Bind( );
            SpeedScale  = ( Single )realTime * 16;
            SpeedScale -= ( Int32 )SpeedScale & ~127;

            for (var fa = s; fa != null; fa = fa.texturechain)
            {
                Device.Graphics.EmitSkyPolys(fa.polys, origin, SpeedScale, true);
            }
        }