mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-12 17:17:09 -04:00
Remove unused ambient lighting code.
This commit is contained in:
parent
49ebc304b9
commit
512657e009
@ -211,16 +211,6 @@ namespace ClassicalSharp.GraphicsAPI {
|
|||||||
device.RenderState.FillMode = fillModes[(int)type];
|
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
|
#region Vertex buffers
|
||||||
|
|
||||||
VertexFormats[] formatMapping = new VertexFormats[] {
|
VertexFormats[] formatMapping = new VertexFormats[] {
|
||||||
|
@ -115,10 +115,6 @@ namespace ClassicalSharp.GraphicsAPI {
|
|||||||
|
|
||||||
public abstract void SetFillType( FillType type );
|
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 {
|
public virtual int InitVb<T>( T[] vertices, DrawMode mode, VertexFormat format ) where T : struct {
|
||||||
return InitVb( vertices, mode, format, vertices.Length );
|
return InitVb( vertices, mode, format, vertices.Length );
|
||||||
}
|
}
|
||||||
|
@ -250,24 +250,6 @@ namespace ClassicalSharp.GraphicsAPI {
|
|||||||
GL.PolygonMode( MaterialFace.FrontAndBack, fillModes[(int)type] );
|
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
|
#region Vertex buffers
|
||||||
|
|
||||||
#if TRACK_RESOURCES
|
#if TRACK_RESOURCES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user