Panda3D
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
BufferViewer Class Reference
Inheritance diagram for BufferViewer:
DirectObject

Public Member Functions

def __init__ (self, win, parent)
 
def advanceCard (self)
 
def analyzeTextureSet (self, x, set)
 
def enable (self, x)
 
def isEnabled (self)
 
def isValidTextureSet (self, x)
 
def maintainReadout (self, task)
 
def makeFrame (self, sizex, sizey)
 
def refreshReadout (self)
 
def selectCard (self, i)
 
def setCardSize (self, x, y)
 
def setExclude (self, x)
 
def setInclude (self, x)
 
def setLayout (self, lay)
 
def setPosition (self, pos)
 
def setRenderParent (self, renderParent)
 
def setSort (self, bin, sort)
 
def toggleEnable (self)
 
- Public Member Functions inherited from DirectObject
def __init__ (self)
 
def accept (self, event, method, extraArgs=[])
 
def acceptOnce (self, event, method, extraArgs=[])
 
def addTask (self, *args, **kwargs)
 
def detectLeaks (self)
 
def doMethodLater (self, *args, **kwargs)
 
def getAllAccepting (self)
 
def ignore (self, event)
 
def ignoreAll (self)
 
def isAccepting (self, event)
 
def isIgnoring (self, event)
 
def removeAllTasks (self)
 
def removeTask (self, taskOrName)
 

Public Attributes

 cardindex
 
 cardmaker
 
 cards
 
 cullbin
 
 cullsort
 
 dirty
 
 enabled
 
 engine
 
 exclude
 
 include
 
 layout
 
 position
 
 renderParent
 
 sizex
 
 sizey
 
 task
 
 win
 

Static Public Attributes

 notify = directNotify.newCategory('BufferViewer')
 
- Static Public Attributes inherited from DirectObject
def accept_once = acceptOnce
 
def add_task = addTask
 
def detect_leaks = detectLeaks
 
def do_method_later = doMethodLater
 
def get_all_accepting = getAllAccepting
 
def ignore_all = ignoreAll
 
def is_accepting = isAccepting
 
def is_ignoring = isIgnoring
 
def remove_all_tasks = removeAllTasks
 
def remove_task = removeTask
 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  win,
  parent 
)
Access: private.  Constructor.

Member Function Documentation

◆ advanceCard()

def advanceCard (   self)
Only useful when using setLayout('cycle').  Increments the index
that selects which card to display.  The index is taken modulo
the actual number of cards.

◆ analyzeTextureSet()

def analyzeTextureSet (   self,
  x,
  set 
)
Access: private.  Converts a list of GraphicsObject,
GraphicsEngine, and Texture into a table of Textures.

◆ enable()

def enable (   self,
  x 
)
Turn the buffer viewer on or off.  The initial state of the
buffer viewer depends on the Config variable 'show-buffers'.

◆ isEnabled()

def isEnabled (   self)
Returns true if the buffer viewer is currently enabled.

◆ isValidTextureSet()

def isValidTextureSet (   self,
  x 
)
Access: private. Returns true if the parameter is a
list of GraphicsOutput and Texture, or the keyword 'all'.

◆ maintainReadout()

def maintainReadout (   self,
  task 
)
Access: private.  Whenever necessary, rebuilds the entire
display from scratch.  This is only done when the configuration
parameters have changed.

◆ makeFrame()

def makeFrame (   self,
  sizex,
  sizey 
)
Access: private.  Each texture card is displayed with
a two-pixel wide frame (a ring of black and a ring of white).
This routine builds the frame geometry.  It is necessary to
be precise so that the frame exactly aligns to pixel
boundaries, and so that it doesn't overlap the card at all.

◆ refreshReadout()

def refreshReadout (   self)
Force the readout to be refreshed.  This is usually invoked
by GraphicsOutput::add_render_texture (via an event handler).
However, it is also possible to invoke it manually.  Currently,
the only time I know of that this is necessary is after a
window resize (and I ought to fix that).

◆ selectCard()

def selectCard (   self,
  i 
)
Only useful when using setLayout('cycle').  Sets the index
that selects which card to display.  The index is taken modulo
the actual number of cards.

◆ setCardSize()

def setCardSize (   self,
  x,
  y 
)
Set the size of each card.  The units are relative to
render2d (ie, 1x1 card is not square).  If one of the
dimensions is zero, then the viewer will choose a value
for that dimension so as to ensure that the aspect ratio
of the card matches the aspect ratio of the source-window.
If both dimensions are zero, the viewer uses a heuristic
to choose a reasonable size for the card.  The initial
value is (0, 0).

◆ setExclude()

def setExclude (   self,
  x 
)
Set the exclude-set for the buffer viewer.  The exclude-set
should be a list of GraphicsOutputs and Textures to ignore.
The exclude-set is subtracted from the include-set (so the excludes
effectively override the includes.)  The initial value is the
empty list.

◆ setInclude()

def setInclude (   self,
  x 
)
Set the include-set for the buffer viewer.  The include-set
specifies which of the render-to-texture targets to display.
Valid inputs are the string 'all' (display every render-to-texture
target), or a list of GraphicsOutputs or Textures.  The initial
value is 'all'.

◆ setLayout()

def setLayout (   self,
  lay 
)
Set the layout of the cards.  The valid values are:
* vline - display them in a vertical line
* hline - display them in a horizontal line
* vgrid - display them in a vertical grid
* hgrid - display them in a horizontal grid
* cycle - display one card at a time, using selectCard/advanceCard
The default value is 'hline'.

◆ setPosition()

def setPosition (   self,
  pos 
)
Set the position of the cards.  The valid values are:
* llcorner - put them in the lower-left  corner of the window
* lrcorner - put them in the lower-right corner of the window
* ulcorner - put them in the upper-left  corner of the window
* urcorner - put them in the upper-right corner of the window
* window   - put them in a separate window
The initial value is 'lrcorner'.

◆ setRenderParent()

def setRenderParent (   self,
  renderParent 
)
Set the scene graph root to which the output cards should
be parented.  The default is render2d. 

◆ setSort()

def setSort (   self,
  bin,
  sort 
)
Set the cull-bin and sort-order for the output cards.  The
default value is 'fixed', 10000.

◆ toggleEnable()

def toggleEnable (   self)
Toggle the buffer viewer on or off.  The initial state of the
enable flag depends on the Config variable 'show-buffers'.

Member Data Documentation

◆ cardindex

cardindex

◆ cardmaker

cardmaker

◆ cards

cards

◆ cullbin

cullbin

◆ cullsort

cullsort

◆ dirty

dirty

◆ enabled

enabled

◆ engine

engine

◆ exclude

exclude

◆ include

include

◆ layout

layout

◆ notify

notify = directNotify.newCategory('BufferViewer')
static

◆ position

position

◆ renderParent

renderParent

◆ sizex

sizex

◆ sizey

sizey

◆ task

task

◆ win

win