/// <summary> /// Initializes a new instance of the <see cref="Renderer"/> class. /// </summary> public Renderer() { _commandBuckets = new List <CommandBucket>(); _nextFrameCommands = new Command[MaxCommands]; _commandCount = 0; _views = new Dictionary <byte, View>(); _shaderPrograms = new Dictionary <int, ShaderProgram>(); #if RENDERER_GL _glProgramCache = new ResourceCache <GLShaderProgram>(MaxShaderPrograms); _glShaderCache = new ResourceCache <GLShader>(MaxShaderPrograms); _glVBCache = new ResourceCache <GLBuffer>(MaxVertexBuffers); _glIBCache = new ResourceCache <GLBuffer>(MaxIndexBuffers); _glTextureCache = new ResourceCache <GLTexture>(MaxTextures); _glSamplerCache = new ResourceCache <GLSampler>(MaxTextures); #endif _currentState = new FrameState(); _defaultBlendState = new BlendState(); _defaultDepthState = new DepthState(); _defaultRasteriserState = new RasteriserState(); _defaultTextureSampler = new TextureSampler(); }
/// <summary> /// Indicates whether the current object is equal to another object of the same type. /// </summary> /// <param name="other">An object to compare with this object.</param> /// <returns> /// true if the current object is equal to the <paramref name="other" /> parameter; otherwise, false. /// </returns> /// <exception cref="System.NotImplementedException"></exception> public bool Equals(RasteriserState other) { if (other == null) { return(false); } return(CullMode == other.CullMode && EnableMultisampling == other.EnableMultisampling); }
public void SetRasteriserState(RasteriserState state) { RasteriserState = state; Instructions |= CommandInstructions.SetRasteriserState; }