c# - I'm trying to make an overlay with XNA. Having troubles making it transparent -
no matter do, cant figure out how make xna game transparent.
http://vitrite.vanmiddlesworth.org/vitrite/shot-full.png
here example of mean. in command prompt partially transparent , im trying myself.
is possible in xna?
that's difficult make transparent without using interface xna not support due d3d version, there workarounds sort of want.
you can similar appearance hooking windows api , grabbing image of last rendered "client area" of window (the desktop special window). in case other windows yours overlapping, grab client areas, clip them using relative position/size, mix them in shader. warning: performance-intensive on update, depending on how many windows had "beneath" own. suggest hooking updates window you're capturing when there's change or when window moves, etc.
check out these in windows api:
[dllimport("user32.dll")] public static extern bool getwindowrect(intptr hwnd, out rect lprect); [dllimport("user32.dll")] public static extern bool printwindow(intptr hwnd, intptr hdcblt, int nflags); be aware not give window border faked transparency though, render area.
also see: transparent window layer click-through , stays on top
you might able use of information in thread well.
Comments
Post a Comment