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; }
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; }