Exemplo n.º 1
0
        public override void DrawShadow(Light a_light)
        {
            if (m_model != null)
            {
                lock (this)
                {
                    if (m_matrices != null)
                    {
                        GraphicsCommand.BindMatrix4(Material.Program, 128, m_matrices);
                    }

                    GraphicsCommand.BindModel(m_model);

                    GraphicsCommand.DrawElementsUInt(m_model.Indices);
                }
            }
        }
Exemplo n.º 2
0
        public override void Draw(Camera a_camera)
        {
            if (m_model != null)
            {
                lock (this)
                {
                    // Dirty but works
                    if (m_matrices != null)
                    {
                        GraphicsCommand.BindMatrix4(Material.Program, 128, m_matrices);
                    }

                    GraphicsCommand.BindModel(m_model);

                    GraphicsCommand.DrawElementsUInt(m_model.Indices);
                }
            }
        }
Exemplo n.º 3
0
        internal override Vector2 Draw(Vector2 a_resolution, Vector2 a_trueResolution)
        {
            if (m_texture != null && m_texture.Initialized)
            {
                CalculateTrueTransform();
                Matrix4 transform = ToMatrix(a_resolution, a_trueResolution);

                Program program = Shaders.TRANSFORM_IMAGE_SHADER_INVERTED;

                GraphicsCommand.BindProgram(program);

                GraphicsCommand.BindMatrix4(program, 0, transform);
                GraphicsCommand.BindTexture(program, 1, m_texture, 0);

                GraphicsCommand.Draw();
            }

            return(a_resolution);
        }