コード例 #1
0
 /// <summary>
 /// Define double buffered RenderSurface.
 /// </summary>
 /// <param name="policy">
 /// A <see cref="BufferPolicy"/>
 /// </param>
 public void DefineStereoBuffers(BufferPolicy policy)
 {
     // Define buffer
     DefineBuffer(BufferType.Stereo, policy);
     // Set stereo buffer flag
     mStereoBuffers = true;
 }
コード例 #2
0
 /// <summary>
 /// Define double buffered RenderSurface.
 /// </summary>
 /// <param name="policy">
 /// A <see cref="BufferPolicy"/>
 /// </param>
 public void DefineDoubleBuffers(BufferPolicy policy)
 {
     // Define buffer
     DefineBuffer(BufferType.Double, policy);
     // Set double buffer flag
     mDoubleBuffers = true;
 }
コード例 #3
0
        /// <summary>
        /// Define RenderSurface multisample buffer.
        /// </summary>
        /// <param name="bits">
        /// A <see cref="Int32"/>
        /// </param>
        /// <param name="policy">
        /// A <see cref="BufferPolicy"/>
        /// </param>
        public void DefineMultisampleBuffer(uint bits, BufferPolicy policy)
        {
            if (bits == 0)
            {
                throw new ArgumentException("zero bits", "bits");
            }

            // Define buffer
            DefineBuffer(BufferType.Multisample, policy);
            // Set multisample bits
            mMultisampleBits = bits;
        }
コード例 #4
0
        /// <summary>
        /// Define RenderSurface color buffer.
        /// </summary>
        /// <param name="pType">
        /// A <see cref="PixelLayout"/>
        /// </param>
        /// <param name="policy">
        /// A <see cref="BufferPolicy"/>
        /// </param>
        public void DefineColorSRGBBuffer(PixelLayout pType, BufferPolicy policy)
        {
            if (pType == PixelLayout.None)
            {
                throw new ArgumentException("invalid pixel type", "pType");
            }

            // Define buffer
            DefineBuffer(BufferType.ColorSRGB, policy);
            // Set color buffer bits.
            mColorType = pType;
        }
コード例 #5
0
        /// <summary>
        /// Define RenderSurface stencil buffer.
        /// </summary>
        /// <param name="bits">
        /// A <see cref="Int32"/>
        /// </param>
        /// <param name="policy">
        /// A <see cref="BufferPolicy"/>
        /// </param>
        public void DefineStencilBuffer(uint bits, BufferPolicy policy)
        {
            if (bits == 0)
            {
                throw new ArgumentException("zero bits", "bits");
            }

            // Define buffer
            DefineBuffer(BufferType.Stencil, policy);
            // Set depth buffer bits
            mStencilBits = bits;
        }
コード例 #6
0
        /// <summary>
        /// Define a buffer in this configuration.
        /// </summary>
        /// <param name="bType">
        /// A <see cref="BufferType"/> indicating the buffer to define.
        /// </param>
        /// <param name="bPolicy">
        /// A <see cref="BufferPolicy"/> specifing the buffer definition policy.
        /// </param>
        private void DefineBuffer(BufferType bType, BufferPolicy bPolicy)
        {
            // Store color buffer definition policy
            switch (bPolicy)
            {
            case BufferPolicy.DontCare:
                mRequiredSurfaceBuffers   &= ~bType;
                mDegradableSurfaceBuffers &= ~bType;
                break;

            case BufferPolicy.Required:
                mRequiredSurfaceBuffers   |= bType;
                mDegradableSurfaceBuffers &= ~bType;
                break;

            case BufferPolicy.RequiredAndDegradable:
                mRequiredSurfaceBuffers   |= bType;
                mDegradableSurfaceBuffers |= bType;
                break;
            }
            // Define buffer
            mSurfaceBuffers |= bType;
        }
コード例 #7
0
 /// <summary>
 /// Define RenderSurface format index.
 /// </summary>
 /// <param name="formatIndex">
 /// A <see cref="Int32"/>
 /// </param>
 /// <param name="policy">
 /// A <see cref="BufferPolicy"/>
 /// </param>
 public void DefineFormatIndex(int formatIndex, BufferPolicy policy)
 {
     mFormatIndex  = formatIndex;
     mFormatPolicy = policy;
 }
コード例 #8
0
		/// <summary>
		/// Define double buffered RenderSurface.
		/// </summary>
		/// <param name="policy">
		/// A <see cref="BufferPolicy"/>
		/// </param>
		public void DefineDoubleBuffers(BufferPolicy policy)
		{
			// Define buffer
			DefineBuffer(BufferType.Double, policy);
			// Set double buffer flag
			mDoubleBuffers = true;
		}
コード例 #9
0
		/// <summary>
		/// Define double buffered RenderSurface.
		/// </summary>
		/// <param name="policy">
		/// A <see cref="BufferPolicy"/>
		/// </param>
		public void DefineStereoBuffers(BufferPolicy policy)
		{
			// Define buffer
			DefineBuffer(BufferType.Stereo, policy);
			// Set stereo buffer flag
			mStereoBuffers = true;
		}
コード例 #10
0
		/// <summary>
		/// Define RenderSurface multisample buffer.
		/// </summary>
		/// <param name="bits">
		/// A <see cref="Int32"/>
		/// </param>
		/// <param name="policy">
		/// A <see cref="BufferPolicy"/>
		/// </param>
		public void DefineMultisampleBuffer(uint bits, BufferPolicy policy)
		{
			if (bits == 0)
				throw new ArgumentException("zero bits", "bits");
			
			// Define buffer
			DefineBuffer(BufferType.Multisample, policy);
			// Set multisample bits
			mMultisampleBits = bits;
		}
コード例 #11
0
		/// <summary>
		/// Define RenderSurface stencil buffer.
		/// </summary>
		/// <param name="bits">
		/// A <see cref="Int32"/>
		/// </param>
		/// <param name="policy">
		/// A <see cref="BufferPolicy"/>
		/// </param>
		public void DefineStencilBuffer(uint bits, BufferPolicy policy)
		{
			if (bits == 0)
				throw new ArgumentException("zero bits", "bits");
			
			// Define buffer
			DefineBuffer(BufferType.Stencil, policy);
			// Set depth buffer bits
			mStencilBits = bits;
		}
コード例 #12
0
		/// <summary>
		/// Define RenderSurface color buffer. 
		/// </summary>
		/// <param name="pType">
		/// A <see cref="PixelLayout"/>
		/// </param>
		/// <param name="policy">
		/// A <see cref="BufferPolicy"/>
		/// </param>
		public void DefineColorSRGBBuffer(PixelLayout pType, BufferPolicy policy)
		{
			if (pType == PixelLayout.None)
				throw new ArgumentException("invalid pixel type", "pType");

			// Define buffer
			DefineBuffer(BufferType.ColorSRGB, policy);
			// Set color buffer bits.
			mColorType = pType;
		}
コード例 #13
0
		/// <summary>
		/// Define RenderSurface format index. 
		/// </summary>
		/// <param name="formatIndex">
		/// A <see cref="Int32"/>
		/// </param>
		/// <param name="policy">
		/// A <see cref="BufferPolicy"/>
		/// </param>
		public void DefineFormatIndex(int formatIndex, BufferPolicy policy)
		{
			mFormatIndex = formatIndex;
			mFormatPolicy = policy;
		}
コード例 #14
0
		/// <summary>
		/// Define a buffer in this configuration.
		/// </summary>
		/// <param name="bType">
		/// A <see cref="BufferType"/> indicating the buffer to define.
		/// </param>
		/// <param name="bPolicy">
		/// A <see cref="BufferPolicy"/> specifing the buffer definition policy.
		/// </param>
		private void DefineBuffer(BufferType bType, BufferPolicy bPolicy)
		{
			// Store color buffer definition policy
			switch (bPolicy) {
				case BufferPolicy.DontCare:
					mRequiredSurfaceBuffers &= ~bType;
					mDegradableSurfaceBuffers &= ~bType;
					break;
				case BufferPolicy.Required:
					mRequiredSurfaceBuffers |= bType;
					mDegradableSurfaceBuffers &= ~bType;
					break;
				case BufferPolicy.RequiredAndDegradable:
					mRequiredSurfaceBuffers |= bType;
					mDegradableSurfaceBuffers |= bType;
					break;
			}
			// Define buffer
			mSurfaceBuffers |= bType;
		}