예제 #1
0
 protected void BindVertexBuffer(NsVertexBuffer buffer)
 {
     if (m_CurVerBuf != buffer)
     {
         m_CurVerBuf = buffer;
                     #if UNITY_5_3_7 || UNITY_5_3_8 || UNITY_5_3_6
         m_DeviceShader.SetBuffer(m_DrawBufKernal, _ciVertexBuffer, buffer.VertexBuf);
         m_DeviceShader.SetBuffer(m_DrawBufKernal, _ciColorBuffer, buffer.ColorBuf);
         m_DeviceShader.SetBuffer(m_DrawBufKernal, _ciUV0Buffer, buffer.UV0Buf);
                     #else
         m_DeviceShader.SetBuffer(m_DrawBufKernal, m_VertexBufId, buffer.VertexBuf);
         m_DeviceShader.SetBuffer(m_DrawBufKernal, m_ColorBufId, buffer.ColorBuf);
         m_DeviceShader.SetBuffer(m_DrawBufKernal, m_UV0BufId, buffer.UV0Buf);
                     #endif
     }
 }
예제 #2
0
 public void DrawBuffer(NsVertexBuffer vertBuf, NsIndex32Buffer idxBuf)
 {
     BindVertexBuffer(vertBuf);
     BindIndex32Buffer(idxBuf);
 }