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 ColorMaterial(MaterialFace face, ColorMaterialParameter mode) { Instance?.ColorMaterial(face, mode); }
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 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 }
private void PrepareState_Colors(GpuStateStruct *GpuState) { GlEnableDisable(EnableCap.ColorMaterial, VertexType.Color != VertexTypeStruct.ColorEnum.Void); var Color = GpuState->LightingState.AmbientModelColor; GL.Color4(&Color.Red); if (VertexType.Color != VertexTypeStruct.ColorEnum.Void && GpuState->LightingState.Enabled) { ColorMaterialParameter flags = (ColorMaterialParameter)0; /* * glMaterialfv(faces, GL_AMBIENT , [0.0f, 0.0f, 0.0f, 0.0f].ptr); * glMaterialfv(faces, GL_DIFFUSE , [0.0f, 0.0f, 0.0f, 0.0f].ptr); * glMaterialfv(faces, GL_SPECULAR, [0.0f, 0.0f, 0.0f, 0.0f].ptr); */ var MaterialColorComponents = GpuState->LightingState.MaterialColorComponents; if (MaterialColorComponents.HasFlag(LightComponentsSet.Ambient)) { GL.Material(MaterialFace.FrontAndBack, MaterialParameter.Ambient, &GpuState->LightingState.AmbientModelColor.Red); } if (MaterialColorComponents.HasFlag(LightComponentsSet.Diffuse)) { GL.Material(MaterialFace.FrontAndBack, MaterialParameter.Ambient, &GpuState->LightingState.DiffuseModelColor.Red); } if (MaterialColorComponents.HasFlag(LightComponentsSet.Specular)) { GL.Material(MaterialFace.FrontAndBack, MaterialParameter.Ambient, &GpuState->LightingState.SpecularModelColor.Red); } if (MaterialColorComponents.HasFlag(LightComponentsSet.AmbientAndDiffuse)) { flags = ColorMaterialParameter.AmbientAndDiffuse; } else if (MaterialColorComponents.HasFlag(LightComponentsSet.Ambient)) { flags = ColorMaterialParameter.Ambient; } else if (MaterialColorComponents.HasFlag(LightComponentsSet.Diffuse)) { flags = ColorMaterialParameter.Diffuse; } else if (MaterialColorComponents.HasFlag(LightComponentsSet.Specular)) { flags = ColorMaterialParameter.Specular; } else { //throw (new NotImplementedException("Error! : " + MaterialColorComponents)); } //flags = GL_SPECULAR; if (flags != 0) { GL.ColorMaterial(MaterialFace.FrontAndBack, flags); } //glEnable(GL_COLOR_MATERIAL); } GL.Material(MaterialFace.FrontAndBack, MaterialParameter.Emission, &GpuState->LightingState.EmissiveModelColor.Red); }
public static void glColorMaterial(MaterialFace face, ColorMaterialParameter mode) { i_OpenGL1_0.glColorMaterial(face, mode); }
internal static extern void glColorMaterial(MaterialFace face, ColorMaterialParameter mode);
public void ColorMaterial(GLFace face, ColorMaterialParameter mode) { gl.glColorMaterial((int)face, (int)mode); CheckException(); }
public static void ColorMaterial(GLFace face, ColorMaterialParameter mode) { gl.glColorMaterial((int)face, (int)mode); }
public static extern void ColorMaterial( MaterialFace face, ColorMaterialParameter mode );
public void ColorMaterial(MaterialFace face, ColorMaterialParameter mode) { glColorMaterial((int)face, (int)mode); }