PDA

View Full Version : Anyone see a way to make this faster?


PEN
11-04-2009, 07:20 PM
So this is a transparent form laid over the viewport, notice the massive decrease in the FPS of the viewport as soon as this is displayed. It is the transparency that is killing it. Any one know why or how to make it any faster?


gw.setTransform (matrix3 1)
viewportPos=mouse.screenpos-mouse.pos
width=gw.getWinSizeX()
height=gw.getWinSizeY()

form=dotNetObject "form"

-- form.AllowTransparency=true
form.BackColor=(dotNetClass "system.drawing.color").fromArgb 0 0 0
form.TransparencyKey=(dotNetClass "system.drawing.color").fromArgb 0 0 0
form.ShowInTaskBar =false
form.FormBorderStyle=form.FormBorderStyle.none

--Label layer
labelLayer=dotNetObject "Label"
labelLayer.backColor=(dotNetClass "system.drawing.color").fromArgb 0 0 0 0
labelLayer.padding=dotNetObject "System.Windows.Forms.Padding" 0
labelLayer.margin=dotNetObject "System.Windows.Forms.Padding" 0
form.controls.add labelLayer

p = DotNetObject "System.IntPtr" ( Windows.GetMAXHWND() )
maxHwnd = DotNetObject "MaxCustomControls.Win32HandleWrapper" p
form.Show ( maxHwnd )

form.bounds=dotNetObject "system.drawing.rectangle" viewportPos.x viewportPos.y width height
labelLayer.bounds=dotNetObject "system.drawing.rectangle" 0 0 form.width form.height

PEN
11-04-2009, 07:25 PM
Interesting thing is you can make it really small and it still hurts performance in the viewport a fair bit.

CGTalk Moderation
11-04-2009, 07:25 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.