예제 #1
0
파일: Device.cs 프로젝트: kubapelc/glob
 /// <summary>
 /// Binds vertex buffer source
 /// </summary>
 public void BindVertexBufferSource(VertexBufferSource vertexBufferSource)
 {
     if (_boundVertexSource != vertexBufferSource)
     {
         vertexBufferSource.Bind();
     }
     _boundVertexSource = vertexBufferSource;
 }
예제 #2
0
파일: Device.cs 프로젝트: kubapelc/glob
 /// <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();
 }