WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   ORTHO image over subwindow (https://forum.worldviz.com/showthread.php?t=4800)

fabioped 09-11-2013 09:51 AM

ORTHO image over subwindow
 
How can I have a image displaying on the viz.ORTHO layer over a subwindow?

I want to display a mouse cursor image on both the mainscreen ORTHO and the subwindow (addWindow) ORTHO

farshizzo 09-11-2013 02:04 PM

If you just want to change the mouse cursor, then I would recommend using the viz.mouse.setCursor command. Here is some sample code:
Code:

import win32con
import win32gui

# Use Windows wait cursor
waitCursor = win32gui.LoadCursor(0,win32con.IDC_WAIT)
viz.mouse.setCursor(waitCursor)

If you want to overlay objects on top of all windows, then you can create a fullscreen sub-window with a higher draw order, and add the objects to that. Here is an example:
Code:

overlay = viz.addWindow(size=(1,1),pos=(0,1))
overlay.visible(False,viz.WORLD)
overlay.visible(False,viz.SCREEN)
overlay.drawOrder(100)
overlay.setClearMask(0)

tex = viz.addTexture('crosshair.png')
quad = viz.addTexQuad(parent=viz.ORTHO,scene=overlay,texture=tex,size=50)
viz.link(viz.Mouse,quad,srcFlag=viz.WINDOW_PIXELS)



All times are GMT -7. The time now is 08:41 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC