/// <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(); }
public void SetDepthState(DepthState state) { DepthState = state; Instructions |= CommandInstructions.SetDepthState; }