Thread: Depth buffer
View Single Post
  #5  
Old 03-22-2013, 02:37 PM
andrewjworz andrewjworz is offline
Member
 
Join Date: Apr 2011
Posts: 11
Alright, one more question: Is there a way to size the quad so that is fits the exact dimensions of the window? I've tried, but I'm not sure how the 'size' parameter in viz.addTexQuad method translates into window coordinates.

I have tried inserting the following code into what you have written:

# Get window size
winsize = viz.MainWindow.getSize(viz.WINDOW_PIXELS)

# Display depth texture on the screen
quad = viz.addTexQuad(viz.SCREEN, size=1 ,align=viz.TEXT_CENTER_CENTER)
quad.setPosition(.5,.5,0)
quad.scale(winsize[0],winsize[1])
Reply With Quote