Bind() public method

public Bind ( int slot ) : void
slot int
return void
Beispiel #1
0
        public void Draw(Texture2D texture, Rectangle size, Color color)
        {
            renderEffect.Begin();
            renderEffect.BeginPass(0);

            texture.Bind(0);
            renderEffect.SetColor("c", color);
            DrawPrimitive(size);

            renderEffect.EndPass();
            renderEffect.End();
        }
Beispiel #2
0
        public void Draw(Texture2D texture, Vector2f position, Color color)
        {
            renderEffect.Begin();
            renderEffect.BeginPass(0);

            texture.Bind(0);
            renderEffect.SetColor("c", color);
            DrawPrimitive(new Rectangle(position, texture.Width, texture.Height));

            renderEffect.EndPass();
            renderEffect.End();
        }