Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!news.glorb.com!solaris.cc.vt.edu!news.vt.edu!newsfeed-00.mathworks.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: Screen Control Fullscreen ON/OFF Date: Thu, 15 Dec 2011 19:50:27 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 43 Message-ID: References: <376e5d38-4384-4453-9719-302150827c58@a17g2000yqj.googlegroups.com> NNTP-Posting-Host: dsl.comtrol.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reader1.panix.com 1323978627 13159 64.122.56.22 (15 Dec 2011 19:50:27 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Thu, 15 Dec 2011 19:50:27 +0000 (UTC) User-Agent: slrn/pre0.9.9-102 (Linux) Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:17312 On 2011-12-15, Nizamov Shawkat wrote: >>> >>> I would like to make fullscreen white and fullscreen black using >>> Python on Linux. With in the specs of the LCD, I want to be able to >>> display fullscreen white and black approximately at 30Hz. Frequency >>> (on/off per second) will be input manually which is between 1-40Hz. >>> Any idea where to start ? Can Python perform such fast thing ? >> >> Forgot to mention and sorry for the pollution ; >> >> My LCD has 2ms respond time thus it can handle a maximum of 50Hz ON/ >> OFF (white/black) thus seems to fit my 1-40Hz range. I am not asking >> or looking for a fully working code, I just need some directions. > > > It depends on whether you want sync to vblank or not. If not, that is > pretty easy - use sleep() or something similar. If you have to use > sync (screen is always either black or white, never partly black and > white) then it is much much more difficult. Actually I do not know of > any way to sync to it. I'm _guessing_ the results won't be acceptible unless you switch during the veritical blanking period. (_is_ there a vertical blanking period with a DVI or HDMI output?). I have vague recollections that I think opengl has methods to do that. If there is an easy way to do it, it'll probably be using pygame: http://pygame.org/news.html If pygame can't do it, try pyopengl: http://pyopengl.sourceforge.net/ Here's a thread on how to do it on OSX: http://www.idevgames.com/forums/thread-2974.html -- Grant Edwards grant.b.edwards Yow! My face is new, my at license is expired, and I'm gmail.com under a doctor's care!!!!