コード例 #1
0
ファイル: _DefTexture.cs プロジェクト: kuviman/csVPE
 public void ApplyShader(Shader shader)
 {
     Texture tex = this.Copy();
     shader.SetTexture("texture", this);
     Draw.BeginTexture(tex);
     Draw.Clear(Color.Transparent);
     Draw.Translate(-1, -1);
     Draw.Scale(2);
     shader.Render();
     Draw.EndTexture();
     this.tex.Dispose();
     this.tex = tex.tex;
 }
コード例 #2
0
ファイル: _DefTexture.cs プロジェクト: kuviman/csVPE
 void Init(bool smooth)
 {
     tex = new RawGL.Texture();
     GL.BindTexture(TextureTarget.Texture2D, tex);
     GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.Repeat);
     GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.Repeat);
     Smooth = smooth;
 }