Home | Trees | Indices | Help |
|
---|
|
object --+ | FrameBuffer
Instance Methods | |||
a new object with type S, a subtype of T |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Properties | |
Inherited from |
Method Details |
|
pygame+GL-based framebuffer class for pype. Wrapper for the pygame platform-independent interface to the framebuffer hardware. This should provide a platform independent handle to the video hardware, which is now accessed via OpenGL. Only one instance per application.
|
FrameBuffer cleanup. Delete held sprites and shut down pygame subsystem. |
Estimate frames per second. Try to determine the approximate frame rate automatically. X11R6 doesn't provide a way to set or query the current video frame rate. To circumvent this, we just flip the page a few times and compute the median inter-frame interval. NB This is always going to be a rought estimate, you should always adjust the /etc/X11/XFConfig-4 file to set the exact frame rate and keep track of in with your data.
|
Set hardware gamma correction values (if possible). Set hardware display gammas using pygame/SDL gamma function. Not all hardware supports hardware gamma correction, so this may not always work.
|
|
|
Draw/set sync pulse sprite. Set the status of the sync pulse.
|
Toggle sync pulse state. Toggle the status of the sync pulse. Light->dark; dark->light.
|
Clear framebuffer. Clear framebuffer to specified color (or default background color, if no color is specfied).
|
Flip framebuffer (sync'd to vert-retrace, if possible). Draw the syncpulse sprite (if enabled) with the appropriate polarity, blit to the screen and then perform a page flip. In general, this method should block until the flip occurs, however, not all video hardware until linux supports blocking on page flips. So be careful and check your hardware. You should be able to use the calcfps() method to get a rough idea of the framerate, if it's very fast (>100 Hz), chances are that the hardware doesn't support blocking on flips. |
Clear keyboard input queue. Clear the keyboard buffer. The way things are currently setup any keystrokes coming into pype are pushed into a queue, the getkey() method below returns the next key in the queue |
Query mouse position. Returns (x,y) coords of mouse in frame buffer coordinates. |
Get next keystroke from queue. Return the next key in the keyboard input queue and pop the keystroke off the queue stack.
|
'unget' keystroke. Push a keystroke event back onto the keyboard queue. Keyboard queue is simulated in pype as a stack, see getkey() method for details.
|
Save screen snapshot to file. Take snapshot of the framebuffer and write it to the specified file.
|
Draw string on framebuffer. Write text string in default font on the framebuffer screen at the specified location. This is primarily useful for running psychophysical studies and debugging. NB Requires the SDL_ttf package
|
|
Draw line directly on framebuffer. Use pygame primitive to draw a straight line on the framebuffer
|
Draw line directly on framebuffer. Use pygame primitive to draw a straight line on the framebuffer
|
Draw circle directly on framebuffer. NB Tue Apr 25 10:14:33 2006 mazer - GL coords are different!!! circles were flipped/mirrored around the x-axis in GL-mode!!!!
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Nov 17 00:22:04 2018 | http://epydoc.sourceforge.net |