public DrawSpriteState(TextureManager textureManager) { _textureManager = textureManager; Texture texture = _textureManager.Get("face_alpha"); Gl.glEnable(Gl.GL_TEXTURE_2D); Gl.glBindTexture(Gl.GL_TEXTURE_2D, texture.Id); Gl.glEnable(Gl.GL_BLEND); Gl.glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA); }
public TestSpriteClassState(TextureManager textureManager) { _textureManager = textureManager; _testSprite.Texture = _textureManager.Get("face_alpha"); _testSprite.SetHeight(256 * 0.5f); _testSprite2.Texture = _textureManager.Get("face_alpha"); _testSprite2.SetPosition(-256, -256); _testSprite2.SetColor(new Color(1, 0, 0, 1)); }