View Full Version : Attach a TexQuad to pit.osgb screen

01-17-2013, 02:46 PM
My goal was to texture an image to the screen in the pit example. This I was able to do, but the horizontal lines of the original black screen show through the image. So I thought if I could attach a TexQuad to the front of the screen I could then texture the image onto that and block out the original black screen.
I was able to do this but I feel I took the long route. (attached image)
I would think that after I got a handle on the screen I could apply a TexQuad to it and then texture the imagine onto it, but I keep failing.

I am new to programming so 1) please laugh if this is dumb and 2) if you do please help also.


01-17-2013, 03:57 PM
The best method would be to simply remove the texture containing the horizontal lines. The following sample shows how to accomplish this:
import viz

pit = viz.add('pit.osgb')

# Apply texture to screen
image = viz.add('images/tile_wood.jpg')
pit.texture(image, node='screen')

# Remove screen line texture
pit.texture(0, node='screen', unit=1)