… | |
… | |
687 | |
687 | |
688 | sub render_child { |
688 | sub render_child { |
689 | my ($self) = @_; |
689 | my ($self) = @_; |
690 | |
690 | |
691 | $self->{texture} = new_from_opengl CFClient::Texture $self->{w}, $self->{h}, sub { |
691 | $self->{texture} = new_from_opengl CFClient::Texture $self->{w}, $self->{h}, sub { |
692 | glClearColor 0.5, 0.5, 0.5, 1; |
692 | glClearColor 0, 0, 0, 0; |
693 | glClear GL_COLOR_BUFFER_BIT; |
693 | glClear GL_COLOR_BUFFER_BIT; |
694 | |
694 | |
695 | $self->_render; |
695 | $self->_render; |
696 | }; |
696 | }; |
697 | } |
697 | } |
… | |
… | |
2319 | my ($self) = @_; |
2319 | my ($self) = @_; |
2320 | |
2320 | |
2321 | glEnable GL_TEXTURE_2D; |
2321 | glEnable GL_TEXTURE_2D; |
2322 | glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE; |
2322 | glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE; |
2323 | glColor 1, 1, 1, 1; |
2323 | glColor 1, 1, 1, 1; |
2324 | $self->{texture}->draw_quad_alpha_premultiplied (0, 0, $self->{children}[0]{w}, $self->{children}[0]{h}); |
2324 | $self->{texture}->draw_quad_alpha (0, 0, $self->{children}[0]{w}, $self->{children}[0]{h}); |
2325 | glDisable GL_TEXTURE_2D; |
2325 | glDisable GL_TEXTURE_2D; |
2326 | |
2326 | |
2327 | $self->{children}[1]->draw; |
2327 | $self->{children}[1]->draw; |
2328 | |
2328 | |
2329 | } |
2329 | } |