public void Draw(Shader shader, RSkeleton skeleton) { if (!Visible) { return; } if (skeleton != null) { shader.SetMatrix4x4("transform", skeleton.GetAnimationSingleBindsTransform(SingleBindIndex)); } // TODO: When is primitive restart used? GL.Enable(EnableCap.PrimitiveRestart); GL.PrimitiveRestartIndex(0xFFFFFFFF); RenderMesh?.Draw(shader); }
public void Draw(Shader shader, Camera camera, RSkeleton skeleton) { if (!Visible) { return; } if (skeleton != null) { var matrix = Matrix4.Identity; if (SingleBindIndex >= 0) { matrix = skeleton.GetAnimationSingleBindsTransform(SingleBindIndex); } shader.SetMatrix4x4("transform", ref matrix); } // TODO: ??? GL.Enable(EnableCap.PrimitiveRestart); GL.PrimitiveRestartIndex(0xFFFFFFFF); RenderMesh?.Draw(shader); }
public void Draw(Shader shader, Camera camera, RSkeleton skeleton) { if (!Visible) { return; } if (skeleton != null) { var matrix = Matrix4.Identity; if (SingleBindIndex >= 0) { matrix = skeleton.GetAnimationSingleBindsTransform(SingleBindIndex); } shader.SetMatrix4x4("transform", ref matrix); } if (Material != null) { SetTextureUniforms(shader); } RenderMesh?.Draw(shader, camera); }
private void SetRenderState() { RenderMesh.SetRenderState(Material); }