public static void FragmentMaterialSGIX(MaterialFace face, MaterialParameter pname, Int32 param)
 {
     Debug.Assert(Delegates.pglFragmentMaterialiSGIX != null, "pglFragmentMaterialiSGIX not implemented");
     Delegates.pglFragmentMaterialiSGIX((Int32)face, (Int32)pname, param);
     LogFunction("glFragmentMaterialiSGIX({0}, {1}, {2})", face, pname, param);
     DebugCheckErrors(null);
 }
Ejemplo n.º 2
0
 public static void IndexMaterialEXT(MaterialFace face, Int32 mode)
 {
     Debug.Assert(Delegates.pglIndexMaterialEXT != null, "pglIndexMaterialEXT not implemented");
     Delegates.pglIndexMaterialEXT((Int32)face, mode);
     LogCommand("glIndexMaterialEXT", null, face, mode);
     DebugCheckErrors(null);
 }
		public static void IndexMaterialEXT(MaterialFace face, Int32 mode)
		{
			Debug.Assert(Delegates.pglIndexMaterialEXT != null, "pglIndexMaterialEXT not implemented");
			Delegates.pglIndexMaterialEXT((Int32)face, mode);
			LogFunction("glIndexMaterialEXT({0}, {1})", face, LogEnumName(mode));
			DebugCheckErrors(null);
		}
Ejemplo n.º 4
0
 public static void Material(MaterialFace face, MaterialParameter pname, Vector4 @params)
 {
     unsafe
     {
         Material(face, pname, (float *)&@params.X);
     }
 }
Ejemplo n.º 5
0
 public static void Material(MaterialFace face, MaterialParameter pname, Color4 @params)
 {
     unsafe
     {
         GL.Material(face, pname, (float *)&@params);
     }
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Sets Rasterizer State information
        /// </summary>
        private void BindRasterizerState()
        {
            MaterialFace mf = MaterialFace.Back;
            PolygonMode  pm = PolygonMode.Fill;

            if (RasterizerState != null)
            {
                switch (RasterizerState.FillMode)
                {
                case 0:
                    pm = PolygonMode.Line;
                    break;

                case 1:
                    pm = PolygonMode.Fill;
                    break;
                }
                switch (RasterizerState.CullMode)
                {
                case 1:
                    mf = MaterialFace.Front;
                    break;

                case 2:
                    mf = MaterialFace.FrontAndBack;
                    break;
                }
            }

            GL.PolygonMode(mf, pm);
        }
Ejemplo n.º 7
0
 public static void TextureMaterialEXT(MaterialFace face, MaterialParameter mode)
 {
     Debug.Assert(Delegates.pglTextureMaterialEXT != null, "pglTextureMaterialEXT not implemented");
     Delegates.pglTextureMaterialEXT((Int32)face, (Int32)mode);
     LogCommand("glTextureMaterialEXT", null, face, mode);
     DebugCheckErrors(null);
 }
Ejemplo n.º 8
0
        private static float[] GetMaterial(MaterialFace materialFace, MaterialParameter materialParameter)
        {
            var @params = new float[4];

            GL.GetMaterial(materialFace, materialParameter, @params);
            return(@params);
        }
 public static void IndexMaterialEXT(MaterialFace face, Int32 mode)
 {
     Debug.Assert(Delegates.pglIndexMaterialEXT != null, "pglIndexMaterialEXT not implemented");
     Delegates.pglIndexMaterialEXT((Int32)face, mode);
     LogFunction("glIndexMaterialEXT({0}, {1})", face, LogEnumName(mode));
     DebugCheckErrors(null);
 }
Ejemplo n.º 10
0
		public static void IndexMaterialEXT(MaterialFace face, Int32 mode)
		{
			Debug.Assert(Delegates.pglIndexMaterialEXT != null, "pglIndexMaterialEXT not implemented");
			Delegates.pglIndexMaterialEXT((Int32)face, mode);
			CallLog("glIndexMaterialEXT({0}, {1})", face, mode);
			DebugCheckErrors();
		}
Ejemplo n.º 11
0
 public static void FragmentColorMaterialSGIX(MaterialFace face, MaterialParameter mode)
 {
     Debug.Assert(Delegates.pglFragmentColorMaterialSGIX != null, "pglFragmentColorMaterialSGIX not implemented");
     Delegates.pglFragmentColorMaterialSGIX((int)face, (int)mode);
     LogCommand("glFragmentColorMaterialSGIX", null, face, mode);
     DebugCheckErrors(null);
 }
Ejemplo n.º 12
0
 public static void FragmentMaterialSGIX(MaterialFace face, MaterialParameter pname, int param)
 {
     Debug.Assert(Delegates.pglFragmentMaterialiSGIX != null, "pglFragmentMaterialiSGIX not implemented");
     Delegates.pglFragmentMaterialiSGIX((int)face, (int)pname, param);
     LogCommand("glFragmentMaterialiSGIX", null, face, pname, param);
     DebugCheckErrors(null);
 }
Ejemplo n.º 13
0
 public static void FragmentColorMaterialSGIX(MaterialFace face, MaterialParameter mode)
 {
     Debug.Assert(Delegates.pglFragmentColorMaterialSGIX != null, "pglFragmentColorMaterialSGIX not implemented");
     Delegates.pglFragmentColorMaterialSGIX((Int32)face, (Int32)mode);
     LogFunction("glFragmentColorMaterialSGIX({0}, {1})", face, mode);
     DebugCheckErrors(null);
 }
Ejemplo n.º 14
0
        public static void ColorMaterial(MaterialFace face, ColorMaterialParameter mode)
        {
#if USE_OPENGL
            OpenTK.Graphics.OpenGL.GL.ColorMaterial((OpenTK.Graphics.OpenGL.MaterialFace)face, (OpenTK.Graphics.OpenGL.ColorMaterialParameter)mode);
#else
            //throw new NotImplementedException();
#endif
        }
 public static void FragmentMaterialSGIX(MaterialFace face, MaterialParameter pname, float[] @params)
 {
     unsafe
     {
         fixed(float *p_params = @params)
         {
             Debug.Assert(Delegates.pglFragmentMaterialfvSGIX != null, "pglFragmentMaterialfvSGIX not implemented");
             Delegates.pglFragmentMaterialfvSGIX((Int32)face, (Int32)pname, p_params);
             LogCommand("glFragmentMaterialfvSGIX", null, face, pname, @params);
         }
     }
     DebugCheckErrors(null);
 }
Ejemplo n.º 16
0
 public static void GetFragmentMaterialSGIX(MaterialFace face, MaterialParameter pname, [Out] int[] @params)
 {
     unsafe
     {
         fixed(int *p_params = @params)
         {
             Debug.Assert(Delegates.pglGetFragmentMaterialivSGIX != null, "pglGetFragmentMaterialivSGIX not implemented");
             Delegates.pglGetFragmentMaterialivSGIX((int)face, (int)pname, p_params);
             LogCommand("glGetFragmentMaterialivSGIX", null, face, pname, @params);
         }
     }
     DebugCheckErrors(null);
 }
Ejemplo n.º 17
0
 public static void GetFragmentMaterialSGIX(MaterialFace face, MaterialParameter pname, [Out] Int32[] @params)
 {
     unsafe
     {
         fixed(Int32 *p_params = @params)
         {
             Debug.Assert(Delegates.pglGetFragmentMaterialivSGIX != null, "pglGetFragmentMaterialivSGIX not implemented");
             Delegates.pglGetFragmentMaterialivSGIX((Int32)face, (Int32)pname, p_params);
             LogFunction("glGetFragmentMaterialivSGIX({0}, {1}, {2})", face, pname, LogValue(@params));
         }
     }
     DebugCheckErrors(null);
 }
Ejemplo n.º 18
0
		/// <summary>
		/// specify this material to OpenGL
		/// </summary>
		/// <param name="lighting"></param>
		/// <param name="face"></param>
		public void ToGL(bool lighting, MaterialFace face = MaterialFace.Front)
		{
			if (lighting)
			{
				GL.Color4(Diffuse);
				GL.Material(MaterialFace.Back, MaterialParameter.Ambient, Color.Red.ToVector());
				GL.Material(MaterialFace.Back, MaterialParameter.Diffuse, Color.Red.ToVector());
				GL.Material(MaterialFace.Back, MaterialParameter.Specular, Color.Red.ToVector());
				GL.Material(face, MaterialParameter.Ambient, Ambiant.ToVector());
				GL.Material(face, MaterialParameter.Diffuse, Diffuse.ToVector());
				GL.Material(face, MaterialParameter.Specular, Specular.ToVector());
				GL.Material(face, MaterialParameter.Shininess, (float)(Shininess * 128f));
			}
			else
				GL.Color4(Ambiant);
		}
Ejemplo n.º 19
0
 /// <summary>
 /// specify this material to OpenGL
 /// </summary>
 /// <param name="lighting"></param>
 /// <param name="face"></param>
 public void ToGL(bool lighting, MaterialFace face = MaterialFace.Front)
 {
     if (lighting)
     {
         GL.Color4(Diffuse);
         GL.Material(MaterialFace.Back, MaterialParameter.Ambient, Color.Red.ToVector());
         GL.Material(MaterialFace.Back, MaterialParameter.Diffuse, Color.Red.ToVector());
         GL.Material(MaterialFace.Back, MaterialParameter.Specular, Color.Red.ToVector());
         GL.Material(face, MaterialParameter.Ambient, Ambiant.ToVector());
         GL.Material(face, MaterialParameter.Diffuse, Diffuse.ToVector());
         GL.Material(face, MaterialParameter.Specular, Specular.ToVector());
         GL.Material(face, MaterialParameter.Shininess, (float)(Shininess * 128f));
     }
     else
     {
         GL.Color4(Ambiant);
     }
 }
Ejemplo n.º 20
0
 public void enableColorMaterial(MaterialFace side)
 {
     if (_ambientLight.Any(value => value != 0.0f ? true : false))  //Если значение было изменено - включаем отражение
     {
         GL.Material(side, MaterialParameter.Ambient, _ambientLight);
     }
     if (_diffuseLight.Any(value => value != 0.0f ? true : false))  //Если значение было изменено - включаем отражение
     {
         GL.Material(side, MaterialParameter.Diffuse, _diffuseLight);
     }
     if (_specularLight.Any(value => value != 0.0f ? true : false))  //Если значение было изменено - включаем отражение
     {
         GL.Material(side, MaterialParameter.Specular, _specRef);
         GL.Material(side, MaterialParameter.Shininess, _shininess);
     }
     if (_emissionLight.Any(value => value != 0.0f ? true : false))  //Если значение было изменено - включаем отражение
     {
         GL.Material(side, MaterialParameter.Emission, _emissionLight);
     }
 }
 public static uint BindMaterialParameterEXT( MaterialFace face, MaterialParameter value )
 {
     if (_BindMaterialParameterEXT == null) throw new Exception( "Extension method BindMaterialParameterEXT not found" );
     return  _BindMaterialParameterEXT( face, value );
 }
Ejemplo n.º 22
0
 public static void Material(MaterialFace face, MaterialParameter pname, Vector4 @params)
 {
     unsafe { Material(face, pname, (float*)&@params.X); }
 }
Ejemplo n.º 23
0
 public partial void TextureMaterial([Flow(FlowDirection.In)] MaterialFace face, [Flow(FlowDirection.In)] MaterialParameter mode);
Ejemplo n.º 24
0
 public static void glGetMaterialiv(MaterialFace face, MaterialParameter pname, ref Int32[] @params)
 {
     i_OpenGL1_0.glGetMaterialiv(face, pname, ref @params);
 }
Ejemplo n.º 25
0
		public static void TextureMaterialEXT(MaterialFace face, MaterialParameter mode)
		{
			Debug.Assert(Delegates.pglTextureMaterialEXT != null, "pglTextureMaterialEXT not implemented");
			Delegates.pglTextureMaterialEXT((Int32)face, (Int32)mode);
			CallLog("glTextureMaterialEXT({0}, {1})", face, mode);
			DebugCheckErrors();
		}
Ejemplo n.º 26
0
 public static void glColorMaterial(MaterialFace face, ColorMaterialParameter mode)
 {
     i_OpenGL1_0.glColorMaterial(face, mode);
 }
Ejemplo n.º 27
0
 public static void glMaterialfv(MaterialFace face, MaterialParameter pname, ref Single[] @params)
 {
     i_OpenGL1_0.glMaterialfv(face, pname, ref @params);
 }
Ejemplo n.º 28
0
		internal static extern void glMaterialiv(MaterialFace face, MaterialParameter pname, [OutAttribute] Int32* @params);
Ejemplo n.º 29
0
		internal static extern void glPolygonMode(MaterialFace face, PolygonMode mode);
Ejemplo n.º 30
0
		internal static extern void glMaterialfv(MaterialFace face, MaterialParameter pname, [OutAttribute] Single* @params);
Ejemplo n.º 31
0
		internal static extern void glMateriali(MaterialFace face, MaterialParameter pname, Int32 param);
Ejemplo n.º 32
0
		internal static extern void glMaterialf(MaterialFace face, MaterialParameter pname, Single param);
Ejemplo n.º 33
0
		internal static extern void glColorMaterial(MaterialFace face, ColorMaterialParameter mode);
Ejemplo n.º 34
0
		public static UInt32 BindMaterialParameterEXT(MaterialFace face, MaterialParameter value)
		{
			UInt32 retValue;

			Debug.Assert(Delegates.pglBindMaterialParameterEXT != null, "pglBindMaterialParameterEXT not implemented");
			retValue = Delegates.pglBindMaterialParameterEXT((Int32)face, (Int32)value);
			CallLog("glBindMaterialParameterEXT({0}, {1}) = {2}", face, value, retValue);
			DebugCheckErrors();

			return (retValue);
		}
		public static void FragmentMaterialSGIX(MaterialFace face, MaterialParameter pname, Int32 param)
		{
			Debug.Assert(Delegates.pglFragmentMaterialiSGIX != null, "pglFragmentMaterialiSGIX not implemented");
			Delegates.pglFragmentMaterialiSGIX((Int32)face, (Int32)pname, param);
			LogFunction("glFragmentMaterialiSGIX({0}, {1}, {2})", face, pname, param);
			DebugCheckErrors(null);
		}
Ejemplo n.º 36
0
		public static void Material(MaterialFace face, MaterialParameter pname, Int32[] @params)
		{
			unsafe {
				fixed (Int32* p_params = @params)
				{
					Debug.Assert(Delegates.pglMaterialiv != null, "pglMaterialiv not implemented");
					Delegates.pglMaterialiv((Int32)face, (Int32)pname, p_params);
					CallLog("glMaterialiv({0}, {1}, {2})", face, pname, @params);
				}
			}
			DebugCheckErrors();
		}
 public static void FragmentMaterialiSGIX( MaterialFace face, MaterialParameter pname, int param )
 {
     if (_FragmentMaterialiSGIX == null) throw new Exception( "Extension method FragmentMaterialiSGIX not found" );
      _FragmentMaterialiSGIX( face, pname, param );
 }
 public static void FragmentMaterialfvSGIX( MaterialFace face, MaterialParameter pname, float[] @params )
 {
     if (_FragmentMaterialfvSGIX == null) throw new Exception( "Extension method FragmentMaterialfvSGIX not found" );
      _FragmentMaterialfvSGIX( face, pname, @params );
 }
Ejemplo n.º 39
0
 public static void glMaterialf(MaterialFace face, MaterialParameter pname, Single param)
 {
     i_OpenGL1_0.glMaterialf(face, pname, param);
 }
Ejemplo n.º 40
0
 internal static extern void glMateriali(MaterialFace face, MaterialParameter pname, Int32 param);
Ejemplo n.º 41
0
 public static void glMateriali(MaterialFace face, MaterialParameter pname, Int32 param)
 {
     i_OpenGL1_0.glMateriali(face, pname, param);
 }
Ejemplo n.º 42
0
 internal static extern void glMaterialiv(MaterialFace face, MaterialParameter pname, [OutAttribute] Int32 * @params);
Ejemplo n.º 43
0
 public static void glPolygonMode(MaterialFace face, PolygonMode mode)
 {
     i_OpenGL1_0.glPolygonMode(face, mode);
 }
Ejemplo n.º 44
0
 internal static extern void glPolygonMode(MaterialFace face, PolygonMode mode);
 public static extern void PolygonMode( MaterialFace face, PolygonMode mode );
		public static void GetFragmentMaterialSGIX(MaterialFace face, MaterialParameter pname, [Out] Int32[] @params)
		{
			unsafe {
				fixed (Int32* p_params = @params)
				{
					Debug.Assert(Delegates.pglGetFragmentMaterialivSGIX != null, "pglGetFragmentMaterialivSGIX not implemented");
					Delegates.pglGetFragmentMaterialivSGIX((Int32)face, (Int32)pname, p_params);
					LogFunction("glGetFragmentMaterialivSGIX({0}, {1}, {2})", face, pname, LogValue(@params));
				}
			}
			DebugCheckErrors(null);
		}
Ejemplo n.º 47
0
 public static void Material(MaterialFace face, MaterialParameter pname, Color4 @params)
 {
     unsafe { GL.Material(face, pname, (float*)&@params); }
 }
Ejemplo n.º 48
0
		public static void ColorMaterial(MaterialFace face, ColorMaterialParameter mode)
		{
			Debug.Assert(Delegates.pglColorMaterial != null, "pglColorMaterial not implemented");
			Delegates.pglColorMaterial((Int32)face, (Int32)mode);
			CallLog("glColorMaterial({0}, {1})", face, mode);
			DebugCheckErrors();
		}
 public static extern void Materialiv( MaterialFace face, MaterialParameter pname, int[] @params );
		public static void FragmentColorMaterialSGIX(MaterialFace face, MaterialParameter mode)
		{
			Debug.Assert(Delegates.pglFragmentColorMaterialSGIX != null, "pglFragmentColorMaterialSGIX not implemented");
			Delegates.pglFragmentColorMaterialSGIX((Int32)face, (Int32)mode);
			LogFunction("glFragmentColorMaterialSGIX({0}, {1})", face, mode);
			DebugCheckErrors(null);
		}
Ejemplo n.º 51
0
		public static void ColorMaterial(MaterialFace face, ColorMaterialParameter mode)
		{
#if USE_OPENGL
			if (openGlHardwareAvailable)
			{
				OpenTK.Graphics.OpenGL.GL.ColorMaterial((OpenTK.Graphics.OpenGL.MaterialFace)face, (OpenTK.Graphics.OpenGL.ColorMaterialParameter)mode);
			}
#else
			//throw new NotImplementedException();
#endif
		}
Ejemplo n.º 52
0
 public partial void IndexMaterial([Flow(FlowDirection.In)] MaterialFace face, [Flow(FlowDirection.In)] IndexMaterialParameterEXT mode);
 public static void IndexMaterialEXT( MaterialFace face, uint mode )
 {
     if (_IndexMaterialEXT == null) throw new Exception( "Extension method IndexMaterialEXT not found" );
      _IndexMaterialEXT( face, mode );
 }
 public static void GetFragmentMaterialivSGIX( MaterialFace face, MaterialParameter pname, [Out]int[] @params )
 {
     if (_GetFragmentMaterialivSGIX == null) throw new Exception( "Extension method GetFragmentMaterialivSGIX not found" );
      _GetFragmentMaterialivSGIX( face, pname, @params );
 }
Ejemplo n.º 55
0
		public static void PolygonMode(MaterialFace face, PolygonMode mode)
		{
			Debug.Assert(Delegates.pglPolygonMode != null, "pglPolygonMode not implemented");
			Delegates.pglPolygonMode((Int32)face, (Int32)mode);
			CallLog("glPolygonMode({0}, {1})", face, mode);
			DebugCheckErrors();
		}
 public static void FragmentColorMaterialSGIX( MaterialFace face, MaterialParameter mode )
 {
     if (_FragmentColorMaterialSGIX == null) throw new Exception( "Extension method FragmentColorMaterialSGIX not found" );
      _FragmentColorMaterialSGIX( face, mode );
 }
Ejemplo n.º 57
0
		public static void Material(MaterialFace face, MaterialParameter pname, Int32 param)
		{
			Debug.Assert(Delegates.pglMateriali != null, "pglMateriali not implemented");
			Delegates.pglMateriali((Int32)face, (Int32)pname, param);
			CallLog("glMateriali({0}, {1}, {2})", face, pname, param);
		}
 public static extern void GetMaterialiv( MaterialFace face, MaterialParameter pname, [Out]int[] @params );
Ejemplo n.º 59
0
 public static void ColorMaterial(MaterialFace face, ColorMaterialParameter mode)
 {
     Instance?.ColorMaterial(face, mode);
 }
Ejemplo n.º 60
0
 internal static extern void glMaterialfv(MaterialFace face, MaterialParameter pname, [OutAttribute] Single * @params);