[Qt-interest] GLSL and two semi-transparent textures
Josiah Bryan
jbryan at productiveconcepts.com
Wed Aug 11 14:28:17 CEST 2010
Samuel Rødal wrote:
> On 08/10/2010 11:16 PM, ext Josiah Bryan wrote:
>> I thought it might have something to do with depth testing, or the Z
>> value of the textures, so I set that up properly, enabled GL_DEPTH_TEST,
>> set glDepthFunc, and added a Z component to the vertex buffers used in
>> the paint method starting on line 602 - that didn't help at all. Same
>> exact outcome.
>>
>> Any suggestions on what I'm doing wrong or how I can get the overlay to
>> blend with the texture behind it instead of the clear color?
>
> I'd say try to make sure depth testing is completely disabled. If you
> just want to paint two textures on top of each other you don't need it.
> It might be that the z values from the last frame are left in the z
> buffer causing the bottom texture to not be painted in that area.
That was it!! Sweet. Just changed the glEnable to:
glDisable(GL_DEPTH_TEST);
And removed the glClearDepth and related lines..and it works!
Thanks for your help - really appreciate it.
Thanks!
-Josiah
More information about the Qt-interest-old
mailing list