Hello All,
I've been monkeying around with implementing a falling sand (ie
http://www.fallingsandgame.com/sand/) type game on the gpu using glsl.
The blur example in experimental was very helpful.

I have a good start on a shader that works, but now I want to draw a
standard pyglet label on the screen at the same time. I am unable to
get the two to work at the same time. Here is a simplified event loop
that illustrates the problem

    while not window.has_exit:
        clk.tick()
        fallingSandShader.install()
        fallingSandShader.usetTex("src", 0, randomFboOne.colourBuffer
(0))
        fallingSandShader.usetTex("rand", 1, randomFboTwo.colourBuffer
(0))
        fallingSandShader.uset1F("randomOffset", 100)
        fallingSandShader.uninstall()

        window.clear()
        window.label.draw()
        window.dispatch_events()

        window.flip()

result:
    completely black window
**********************************

    while not window.has_exit:
        clk.tick()
        fallingSandShader.install()
        fallingSandShader.usetTex("src", 0, randomFboOne.colourBuffer
(0))
       ############################## fallingSandShader.usetTex
("rand", 1, randomFboTwo.colourBuffer(0))
        fallingSandShader.uset1F("randomOffset", 100)
        fallingSandShader.uninstall()

        window.clear()
        window.label.draw()
        window.dispatch_events()

        window.flip()

result:
    black window, my label with white text displays as expected


I can't figure out why commenting out the binding of the second
texture allows the label to display. I'm hoping someone with some
opengl knowledge can point out something simple I'm doing wrong.


Here is the entire program which can be run out of the experimental
directory: http://pastebin.com/m36aadc78.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to