示例#1
0
 /// <summary>
 /// (Internal) Called each frame. Draws the sprites, if any.
 /// </summary>
 internal void OnRenderFrame()
 {
     if (Sprites.Count == 0)
     {
         return;
     }
     SpriteVBO.Render();
 }
示例#2
0
        public override void Render()
        {
            TheClient.SetVox();
            Matrix4d mat = Matrix4d.CreateTranslation(-ClientUtilities.ConvertD(Offset)) * GetTransformationMatrix();

            TheClient.MainWorldView.SetMatrix(2, mat);
            vbo.Render(false);
        }
示例#3
0
 /// <summary>
 /// (Internal) Called each frame. Draws the cursor VBO, if required.
 /// </summary>
 internal void OnRenderFrame()
 {
     if (!Enabled)
     {
         return;
     }
     CursorVBO.Render();
 }
示例#4
0
 public void Render()
 {
     if (_VBO != null && _VBO.generated)
     {
         Matrix4d mat = Matrix4d.CreateTranslation(ClientUtilities.ConvertD(WorldPosition.ToLocation() * CHUNK_SIZE));
         OwningRegion.TheClient.MainWorldView.SetMatrix(2, mat);
         _VBO.Render(OwningRegion.TheClient.RenderTextures);
     }
 }
 public override void Render(GLContext context)
 {
     if (PrimaryEditor.RenderLines)
     {
         context.Textures.White.Bind();
         context.Rendering.RenderLineBox(Mins, Maxes, RotMatrix());
     }
     else
     {
         Location HalfSize = (Maxes - Mins) / 2;
         Matrix4  mat      = Matrix4.CreateScale((float)HalfSize.X, (float)HalfSize.Y, (float)HalfSize.Z) * RotMatrix() * Matrix4.CreateTranslation((Mins + HalfSize).ToOVector());
         GL.UniformMatrix4(2, false, ref mat);
         context.Rendering.SetMinimumLight(1.0f);
         MyVBO.Render(PrimaryEditor.RenderTextures);
     }
 }
示例#6
0
文件: Figure3D.cs 项目: tirinox/Rays
 public void Render(bool Pick, bool Selected)
 {
     if (!Pick)
     {
         Vbo.Render();
         if (Selected)
         {
             Utils.GColor(System.Drawing.Color.DeepPink);
             Gl.glLineWidth(3);
             MyAABB.Render();
         }
     }
     else
     {
         Render1(true, false, true);
     }
 }
示例#7
0
        /// <summary>
        /// Draws the current UIPage, if any.
        /// </summary>
        internal void OnRenderFrame()
        {
            if (Invalidated)
            {
                ClearTiles();
                if (Active)
                {
                    Page.DrawTiles(UIVBO);
                }
                Invalidated = false;
            }

            if (!Active)
            {
                return;
            }
            UIVBO.Render();
        }
示例#8
0
        public void Render(bool Pick)
        {
            if (!Pick && DisplayListScene != -1)
            {
                Gl.glCallList(DisplayListScene);
            }

            Gl.glEnable(Gl.GL_LIGHTING);
            Gl.glEnable(Gl.GL_DEPTH_TEST);
            foreach (Figure3D F in Figs)
            {
                F.Render(Pick, Selected == F);
            }

            if (!Pick && RaysVisible)
            {
                RaysVBO.Render();
            }
        }