Configure blending at start of drawing.
parent
34283bd754
commit
d2c38bb48a
|
@ -77,8 +77,6 @@ static void button_rect(ButtonPart part, int x1, int y1, int x2, int y2)
|
||||||
|
|
||||||
void SmallButton::OnPaint(const PUi *pui) const
|
void SmallButton::OnPaint(const PUi *pui) const
|
||||||
{
|
{
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
GLuint t = TEX_BUTTONS;
|
GLuint t = TEX_BUTTONS;
|
||||||
|
@ -97,8 +95,6 @@ void SmallButton::OnPaint(const PUi *pui) const
|
||||||
|
|
||||||
void LargeButton::OnPaint(const PUi *pui) const
|
void LargeButton::OnPaint(const PUi *pui) const
|
||||||
{
|
{
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
GLuint t = TEX_BUTTONS;
|
GLuint t = TEX_BUTTONS;
|
||||||
|
|
|
@ -84,8 +84,6 @@ static void DrawPartial(GLuint t1, GLuint t2, int seg, float x1, float y1, float
|
||||||
|
|
||||||
void Knob::OnPaint(const PUi *pui) const
|
void Knob::OnPaint(const PUi *pui) const
|
||||||
{
|
{
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
float mx = (w - pui->w[TEX_KNOB]) * 0.5f + x;
|
float mx = (w - pui->w[TEX_KNOB]) * 0.5f + x;
|
||||||
|
|
|
@ -38,6 +38,10 @@ void PUi::OnDisplay()
|
||||||
if (!this->initialised) this->InitTextures();
|
if (!this->initialised) this->InitTextures();
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
glEnable(GL_BLEND);
|
||||||
|
|
||||||
this->widget->OnPaint(this);
|
this->widget->OnPaint(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,8 +85,6 @@ void HSlider::OnPaint(const PUi *pui) const
|
||||||
{
|
{
|
||||||
float m = (value - min) / (max - min);
|
float m = (value - min) / (max - min);
|
||||||
|
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
GLuint t = TEX_SLIDERS;
|
GLuint t = TEX_SLIDERS;
|
||||||
|
@ -131,8 +129,6 @@ void VSlider::OnPaint(const PUi *pui) const
|
||||||
{
|
{
|
||||||
float m = (value - min) / (max - min);
|
float m = (value - min) / (max - min);
|
||||||
|
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
GLuint t = TEX_SLIDERS;
|
GLuint t = TEX_SLIDERS;
|
||||||
|
|
Loading…
Reference in New Issue