Remove unused ambient lighting code.

This commit is contained in:
UnknownShadow200 2015-05-07 16:27:54 +10:00
parent 49ebc304b9
commit 512657e009
3 changed files with 0 additions and 32 deletions

View File

@ -211,16 +211,6 @@ namespace ClassicalSharp.GraphicsAPI {
device.RenderState.FillMode = fillModes[(int)type];
}
public override bool AmbientLighting {
set {
if( !value ) device.RenderState.Ambient = Color.White;
}
}
public override void SetAmbientColour( FastColour col ) {
device.RenderState.Ambient = col.ToColor();
}
#region Vertex buffers
VertexFormats[] formatMapping = new VertexFormats[] {

View File

@ -115,10 +115,6 @@ namespace ClassicalSharp.GraphicsAPI {
public abstract void SetFillType( FillType type );
public abstract bool AmbientLighting { set; }
public abstract void SetAmbientColour( FastColour col );
public virtual int InitVb<T>( T[] vertices, DrawMode mode, VertexFormat format ) where T : struct {
return InitVb( vertices, mode, format, vertices.Length );
}

View File

@ -250,24 +250,6 @@ namespace ClassicalSharp.GraphicsAPI {
GL.PolygonMode( MaterialFace.FrontAndBack, fillModes[(int)type] );
}
public override bool AmbientLighting {
set {
if( value ) {
GL.Enable( EnableCap.Lighting );
GL.Enable( EnableCap.ColorMaterial );
GL.ColorMaterial( MaterialFace.FrontAndBack, ColorMaterialParameter.Ambient );
} else {
GL.Disable( EnableCap.Lighting );
GL.Disable( EnableCap.ColorMaterial );
}
}
}
public unsafe override void SetAmbientColour( FastColour col ) {
Vector4 colRGBA = new Vector4( col.R / 255f, col.G / 255f, col.B / 255f, 1 );
GL.LightModel( LightModelParameter.LightModelAmbient, &colRGBA.X );
}
#region Vertex buffers
#if TRACK_RESOURCES