Пример #1
0
        public void RenderChar(Texture tex, float x, float y, float w, float h)
        {
            _pgm.Use();
            _win.Disable <DepthFeature>();
            _uTextureEnabled.Set(true);
            Transform(x, y, w, h);
            using (TextureUnit unit = _tw.Use(tex)) {
                _uTexture.Set(unit);
                _indices.Draw(GeometricPrimitives.Triangles);
            }

            _win.Enable <DepthFeature>();
        }
Пример #2
0
 public void Set(TextureUnit unit)
 {
     CheckType(PrimitiveTypes.Sampler, 2);
     GL.Uniform1(_location, unit.Slot);
 }