PDA

View Full Version : displayHTML and side by side stereo


hosier
04-16-2009, 07:31 AM
In the application I'm developing, I've given the user a menu to choose the stereo mode they'd like to use, either Anaglyph, OpenGL or side by side. At times the user is also presented the option to open a webpage for more information. The displayHTML function works great if they're in anaglyph or OpenGL mode, but of course in the side by side mode, the webpage gets split between the left and right views.

Has anybody figured out a work around for this, or should I just not allow the viewing of html while in side by side stereo? I would see it as a pretty handy feature if we could do it, as for our large scale setups we use the side by side passive setup because it's cheaper than the active setup.

Thanks.

Aaron

farshizzo
04-16-2009, 12:39 PM
The following example script shows how to specify the size and position of the HTML window. This allows you to place it on the left half of the screen when using side-by-side stereo.import viz
viz.go(viz.STEREO)

viz.add('gallery.ive')

def ShowHTML():

#Get current window size
w,h = viz.window.getSize()

#Only use left half of window
w = w * 0.5

#Set HTML size to 2/3 window size
width = int(w * 0.667)
height = int(h * 0.667)

#Center HTML in window
x = int((w - width) * 0.5)
y = int((h - height) * 0.5)

#Display HTML using custom position and size
viz.window.displayHTML('http://www.google.com',pos=[x,y],size=[width,height])

vizact.onkeydown(' ',ShowHTML)

hosier
04-17-2009, 04:17 PM
Thanks.

Aaron

sircedric4
08-27-2009, 08:50 AM
I have the same basic question as above, but instead would like the html image to be stereoscopic, or in other words, the same html image in both eyes.

I placed the html in just the left eye and although it is ok, I would prefer the displayHTML to work more like a texquad does and be in the same location on the screen in both views.

Is there a mechanism, whether using texquads or separate windows to have an html page pulled in and useable as a webpage but for it to be in stereoscopic vision so that it is crisp and readable without closing one eye?

farshizzo
08-28-2009, 03:21 PM
I believe the only way to accomplish this is to display the HTML window in fullscreen, and use the <frame> tag to display the same page side by side.