public void CreateUI(GLEx g) { if (isClose) { return; } if (!visible) { return; } lock (image) { if (alpha > 0 && alpha < 1) { g.SetAlpha(alpha); } if (!IsComplete() && isDirty) { g.DrawTexture2D(image.GetBitmap(), X(), Y(), width, height); isDirty = false; } else if (!IsComplete()) { g.DrawTexture2D(image.GetBitmap(), X(), Y(), width, height); } if (alpha > 0 && alpha < 1) { g.SetAlpha(1f); } } }
public void Draw(GLEx g, float x, float y, float w, float h) { if (isClose) { return; } lock (buffer) { g.DrawTexture2D(buffer.GetBitmap(), x, y, w, h); } }