Пример #1
0
            public void Draw(DrawState state)
            {
                if (directionId == -1)
                {
                    directionId = state.GetShaderAttributeNameUniqueID("sampleDirection");
                    texutreId   = state.GetShaderAttributeNameUniqueID("Texture");
                }

                drawable.Shader.SetAttribute(state, directionId, ref direction);
                drawable.Shader.SetTexture(state, texutreId, source.GetTexture());

                drawable.Draw(state);
            }
Пример #2
0
 //draw the element on screen
 public void Draw(DrawState state)
 {
     //the ShaderElement class automatically calls the shader Bind() method
     element.Draw(state);
 }