예제 #1
0
 /// <summary>
 /// This function writes an object to the stream.
 /// </summary>
 /// <param name="writer">The writer to write to.</param>
 /// <param name="sceneObject">The object to write.</param>
 public virtual void Write(BinaryWriter writer, SceneObject sceneObject)
 {
 }
예제 #2
0
 protected virtual void WriteData(BinaryWriter writer, SceneObject sceneObject)
 {
 }
예제 #3
0
파일: Scene.cs 프로젝트: nromik/sharpgl
        /// <summary>
        /// This function automatically makes an object look selected.
        /// </summary>
        /// <param name="ob"></param>
        public virtual void DrawObjectSelected(SceneObject ob)
        {
            gl.Enable(OpenGL.BLEND);
            gl.BlendFunc(OpenGL.SRC_ALPHA,OpenGL.ONE);

            gl.Color(1, 0, 0, 0.2f);
            gl.Disable(OpenGL.LIGHTING);
            gl.DepthFunc(OpenGL.ALWAYS);

            ob.Draw(gl);

            gl.Enable(OpenGL.LIGHTING);

            gl.Disable(OpenGL.BLEND);
            gl.DepthFunc(OpenGL.LESS);
        }