Avoid transparency in qopenglwindow example

On systems that give alpha configs by default writing alpha values of
less than 1.0 is a bad idea since it will lead to the content behind the
window becoming visible, even though this is not the example's intention.

Change-Id: I23cdfc1fb78d77b1cbc192d2aba5d6665a7acfcc
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This commit is contained in:
Laszlo Agocs 2014-08-12 11:45:50 +02:00
parent 0b153bc93a
commit 6f7bc2a707
2 changed files with 3 additions and 2 deletions

View File

@ -20,5 +20,6 @@ void main()
{
highp float coordNoise = noise(gl_FragCoord.xy);
highp float proximity = smoothstep(0.5, 1.0, (curv() + 1.0) * (coordNoise ));
gl_FragColor = vec4(coordNoise, coordNoise, coordNoise, 1.0) * proximity;
highp vec3 color = vec3(coordNoise) * proximity;
gl_FragColor = vec4(color, 1.0);
}

View File

@ -89,7 +89,7 @@ void FragmentToy::draw(const QSize &windowSize)
glDisable(GL_STENCIL_TEST);
glDisable(GL_DEPTH_TEST);
glClearColor(0,0,0,0);
glClearColor(0, 0, 0, 1);
glClear(GL_COLOR_BUFFER_BIT);
if (!m_vao.isCreated())
m_vao.create();