예제 #1
0
        public void Render(Camera camera)
        {
            var shader = ShaderContainer.GetCurrentRModelShader();

            if (!shader.LinkStatusIsOk)
            {
                return;
            }

            shader.UseProgram();

            if (boneUniformBuffer == null)
            {
                boneUniformBuffer = new UniformBlock(shader, "Bones");
            }

            boneUniformBuffer.BindBlock(shader);

            RModel.SetRenderSettingsUniforms(shader);
            RModel.SetCameraUniforms(camera, shader);

            RModel.DrawMeshes(Meshes, shader, boneUniformBuffer);
        }