I know make a unregular window in wxPython is a easy thing.
But I want to make the window’s shape like the panda, and when panda is moving or jumping, the window’s shape has always been changed with the model.
How to do it ?
Any solution or source or suggestion?
Hmm, I don’t know how shaped windows work, (I’ve never heard of it before, I always assumed they were just rectangular windows with alpha), but you might be able to parent your Panda window to your shaped Wx window, using the setParentWindow in the WindowProperties.
Before importing DirectStart, you need to do:
from pandac.PandaModules import loadPrcFileData
loadPrcFileData("", "window-type none")
Then, after you have created a wxPython window (I believe you must also have called Update or so on it), do this:
props = WindowProperties.getDefault()
I haven’t tested it, but something along the lines of that could work.
I would have no clue how to adjust the shape based on the model, you would need to write code for that, I think.
Really, you’re better off with an undecorated window with transparent background.
thank you very much!
Shaped window is common I think. I have seen lots of programes like that.
I have ever searched some references about shaped window in panda, but I cann’t find a good way to do it as so far.
Thank u . I will try it as what u said.
God bless me
Shaped windows are common in 2-d applications. They are very rare in 3-d applications. The 3-d hardware is just not designed to make alpha windows that you can see through to your desktop. People have done it, but only by using tricks involving copying the framebuffer image to RAM every frame and then loading it onto a 2-d widget.
oh, you r right. what I have seen are mostly 2-d applications.
What I want to do is just a pet on the desktop, like a cat. it is moving,jumping on desktop.
so could you suggest me some solutions? alpha or framebuffer image?
I am afraid framebuffer image will slow the application