Exemplo n.º 1
0
 /// <summary>
 /// Binds vertex buffer source
 /// </summary>
 public void BindVertexBufferSource(VertexBufferSource vertexBufferSource)
 {
     if (_boundVertexSource != vertexBufferSource)
     {
         vertexBufferSource.Bind();
     }
     _boundVertexSource = vertexBufferSource;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Changes all current states to null, so any future bind or state change will effectively skip redundant state change checks and should execute its OpenGL calls.
 /// </summary>
 public void Invalidate()
 {
     ShaderPipeline = null;
     _textureUnit.Invalidate();
     _currentRasterizerState = null;
     _currentDepthState      = null;
     _currentBlendState      = null;
     _boundReadFramebuffer   = -1;
     _boundDrawFramebuffer   = -1;
     _boundBothFramebuffer   = -1;
     _boundVertexFormat      = null;
     _boundVertexSource      = null;
     _bufferBindingManager.Invalidate();
 }