ProGUI V1.38 UI Library (Small Bug Fix)

Developed or developing a new product in PureBasic? Tell the world about it.
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: ProGUI V1.36 User Interface Library (Small bug fix)

Post by Zach »

That looks pretty cool.
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.36 User Interface Library (Small bug fix)

Post by PrincieD »

Zach wrote:That looks pretty cool.
Thanks! :)

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
User avatar
electrochrisso
Addict
Addict
Posts: 989
Joined: Mon May 14, 2007 2:13 am
Location: Darling River

Re: ProGUI V1.36 User Interface Library (Small bug fix)

Post by electrochrisso »

Great example Chris, only uses 20% of CPU at full screen (1024x600) on my 1.5ghz netbook, with basic graphics processor, and if I reduce the window to about 500x300, move it around, meanwhile the animation is still happening at the same time, CPU uses about 40%.
Super 8) man.
PureBasic! Purely the best 8)
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.36 User Interface Library (Small bug fix)

Post by PrincieD »

electrochrisso wrote:Great example Chris, only uses 20% of CPU at full screen (1024x600) on my 1.5ghz netbook, with basic graphics processor, and if I reduce the window to about 500x300, move it around, meanwhile the animation is still happening at the same time, CPU uses about 40%.
Super 8) man.
Thanks mate! :) that's really good performance (baring in mind 200 alpha transparent images/stars with real-time resizing), can you try removing the overlay gradient on the main PanelEx and let me know what the CPU usage is like? (should be a lot better as the gradients rape the CPU at the moment! ;) lol) also if you remove the 30 millisec delay in the animation thread you'll really see it fly! heheh

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
User avatar
electrochrisso
Addict
Addict
Posts: 989
Joined: Mon May 14, 2007 2:13 am
Location: Darling River

Re: ProGUI V1.36 User Interface Library (Small bug fix)

Post by electrochrisso »

Thanks mate! :) that's really good performance (baring in mind 200 alpha transparent images/stars with real-time resizing), can you try removing the overlay gradient on the main PanelEx and let me know what the CPU usage is like? (should be a lot better as the gradients rape the CPU at the moment! ;) lol) also if you remove the 30 millisec delay in the animation thread you'll really see it fly! heheh
Half Window dropped to 10%, Full Window 15%, if I implement the ExplorerBar code, 14% & 18% respectively, and if I comment out the PanelEx, no change.
As for moving the window around there is no change, this seems to be a windows thing, even if I move a plain small window around it will use about 40%.
Actually I did remove the delay, and noticed quite a rapid speed increase and it only increased the CPU usage from 10% to 30%, the stars were going that fast I thought they were going to fly out of my screen and hit me in the head. :lol:

You have really done some great optimisation in your code mate. :D
PureBasic! Purely the best 8)
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.36 User Interface Library (Small bug fix)

Post by PrincieD »

electrochrisso wrote: Half Window dropped to 10%, Full Window 15%, if I implement the ExplorerBar code, 14% & 18% respectively, and if I comment out the PanelEx, no change.
As for moving the window around there is no change, this seems to be a windows thing, even if I move a plain small window around it will use about 40%.
Actually I did remove the delay, and noticed quite a rapid speed increase and it only increased the CPU usage from 10% to 30%, the stars were going that fast I thought they were going to fly out of my screen and hit me in the head. :lol:

You have really done some great optimisation in your code mate. :D
Thanks for testing that out for me Chris I appreciate it! Still some more optimizations to do but I'm pretty pleased with the performance so far :)

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.36 User Interface Library (Small bug fix)

Post by PrincieD »

Exciting Major Update 2 News!

Hey guys! sorry you've not heard anything from me for a while, that's because I've been busy beavering away at the core of Major Update 2 :)
I'm happy to announce that it will be released very soon and support full GPU accelerated rendering using Direct2D (a first for PureBasic! :shock: ) on Windows Vista/7/8 and gracefully fall back onto GDI (with some hardware acceleration) on older operating systems! Even runs on Windows 2000 flawlessly!

As I've previously posted, the new image subsystem uses "SuperBuffers" that are 2D bin-packed (like a light-map texture in 3D games) in real-time which gives great benefits: No memory fragmentation, GPU optimized format and hardly any GDI handle usage under both GDI and Direct2D rendering. For instance the OfficeExample in the current version of ProGUI uses around 1300 GDI handles, this will go down to around 20 in the new version! :shock: So immediately any application written using ProGUI will outperform any competing application on both resource usage and raw speed.

I've created a tech demo for you guys to test, you can download it here: http://www.progui.co.uk/downloads/TechDemo.zip
And here are some screen shots:

Image
Image
Image

On my Nvidia GT 420M laptop the Direct2D driver can easily handle 3,000 balls at 60 fps, let me know how it runs on your systems :)
The SuperBuffer housekeeping thread also runs regularly in the background on a short loop for demonstration purposes so you can see how it all works when you click on the "View SuperBuffer Debug UI" button. The tech demo also creates and loads in a bunch of test images which can be seen in the memory dump (as icons and red/green rectangles).

Currently the new Img API (which is directly available to the user) supports the following commands (still some more to write, such as gradients and text but won't take long at all):

SetImgRenderDriver(Driver)
GetImgRenderDriver()
ImgPath(Path.s)
CreateImg(width, height)
LoadImg(Path.s, Width.l, Height.l, Flags.i)
ImgWidth(Image.i)
ImgHeight(Image.i)
ImgBeginDraw()
ImgBlit(srcImg, x, y, width, height, dstImg, dx, dy)
ImgDraw(srcImg, x, y, width, height, dstImg, dx, dy, dwidth, dheight, alpha)
ImgFillRect(Img, *area.RECT, color)
ImgFillBox(Img, x, y, width, height, color)
ImgBorder(Img, Border, Xpos, Ypos, Width, Height, Alpha.a)
ImgMask(Img, Mask)
ImgGrab(Img, x, y, width, height)
ImgEndDraw()
ImgToHdc(Img, hdc)
ImgToImage(Img)
ImgToHBitmap(Img)
ImgFromHdc(hdc)
ImgFromImage(Image)
ImgFromHBitmap(hbitmap)
ImgFromHIcon(hicon)
ImgBlend(Image.i, AlphaChannel.f, Contrast.f, Brightness.f, Color.l, BlendAmount.f, Flags)
ImgHueBlend(Image.i, AlphaChannel.f, HueColor.l, Saturation.f, Lightness.f, BlendColor.l, BlendAmount.f, Flags)
FreeImg(Image.i)
CreateMask(Width, Height)
CreateImgMask(Img, TransparentColor)
MaskCombine(dstMask, srcMask1, srcMask2, CombineMode)
MaskOffset(Mask, x, y)
CreateBorder(Img, ImgMask, *BorderRect.RECT)
BorderMask(Border, Width, Height)

The whole system has been designed modularly and allows new drivers to be added with ease making the eventual transition of ProGUI to cross-platform fairly straight forward. It's also worth mentioning that Windows 8 Metro Apps will be possible with ProGUI in the future due to the Direct2D driver and of course DirectX interoperability :)

So that's it guys, I've just got to finish wrapping up the Img API and then replace the guts of ProGUI to use it (which will only take a few days). The price for Major Update 2 will be going up a little and existing Standard and Gold users will have to upgrade however this is the first paid update in about 30 previously free updates :) so it's probably worth while upgrading to Platinum while the price is cheap in order to take advantage of all future updates for free. Also, Major Update 2 will start at Version 1.5x allowing the existing V1.3x space for bug fixes if any more are found (a V1.37 will be released just before Major Update 2 fixing the last 2 known bugs).

Thanks guys and let me know how the tech demo runs! :D

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: ProGUI V1.36 User Interface Library (Small bug fix)

Post by srod »

Absolutely awesome demo.

My cheap old Win 7 laptop with integrated graphics and the rest runs the D2D version flawlessly. The GDI version is a bit 'lumpy' in comparison (but only because the D2D one is so smooth) but only to be expected on my slow machine. Both x86 and x64 versions run fine.

With the next update I shall be making a purchase of the platinum license (need to save a few more pennies first!)

I always told myself I'd purchase this when I was happy that the product had matured somewhat; just to make sure it was here to stay! :wink:

Well done Chris.
I may look like a mule, but I'm not a complete ass.
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.36 User Interface Library (Small bug fix)

Post by PrincieD »

Thanks Stephen!! :D :D I'm glad it's working great and thanks for reporting your specs too it helps a lot :)

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
User avatar
electrochrisso
Addict
Addict
Posts: 989
Joined: Mon May 14, 2007 2:13 am
Location: Darling River

Re: ProGUI V1.36 User Interface Library (Small bug fix)

Post by electrochrisso »

8) Chris, I have only tested on my netbook sofar, and it seems it does not handle Direct2D, very well, actually GDI goes smoother and faster. :shock:, still nothing flash though. This thing has very basic on-board graphics, Intel GMA, and still running the 2009 drivers, perhaps it has been optimised to run under GDI.
What I can say so far, when running the Direct2D, the balls seem to move at the same rate from 10 up to 1000 balls, nothing changes when setting between 30 and 60fps, and the CPU only uses 20%.
I am in a bit of a hurry at the moment, but I will crank up my other laptop tmw, it has a much better dedicated graphics card, and will let you know how it goes on that one.
PureBasic! Purely the best 8)
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: ProGUI V1.36 User Interface Library (Small bug fix)

Post by Zach »

So awesome man... Keep up the good work!

Once you get the Text commands in, I think I can build my whole Game GUI with this 8) (I hope)

I ran the tech demo, at 10k balls at 30 and 60FPS no problem :mrgreen:
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.36 User Interface Library (Small bug fix)

Post by PrincieD »

electrochrisso wrote:8) Chris, I have only tested on my netbook sofar, and it seems it does not handle Direct2D, very well, actually GDI goes smoother and faster. :shock:, still nothing flash though. This thing has very basic on-board graphics, Intel GMA, and still running the 2009 drivers, perhaps it has been optimised to run under GDI.
What I can say so far, when running the Direct2D, the balls seem to move at the same rate from 10 up to 1000 balls, nothing changes when setting between 30 and 60fps, and the CPU only uses 20%.
I am in a bit of a hurry at the moment, but I will crank up my other laptop tmw, it has a much better dedicated graphics card, and will let you know how it goes on that one.
Thanks for testing dude :) yes I suspect the netbook will only have minimal support for 3D and have drivers more optimized for GDI. I'm just wondering if there's a good way to check the performance of the GPU and then choose either the GDI driver or Direct2D. I could probably do this based on GPU memory or max texture size/shader support maybe? How much dedicated GPU memory does your netbook have Chris?
Zach wrote:So awesome man... Keep up the good work!

Once you get the Text commands in, I think I can build my whole Game GUI with this 8) (I hope)

I ran the tech demo, at 10k balls at 30 and 60FPS no problem :mrgreen:
:D :D Thanks Zach that's fantastic! :) The great thing as well with offloading all the rendering onto the GPU is hardly any CPU or system memory usage :)

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: ProGUI V1.36 UI Library (Exciting Direct2D News + TechDe

Post by Poshu »

60000 balls and everything is still so smooth :D
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.36 UI Library (Exciting Direct2D News + TechDe

Post by PrincieD »

Poshu wrote:60000 balls and everything is still so smooth :D
Sweet! thanks Poshu mate :)

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: ProGUI V1.36 UI Library (Exciting Direct2D News + TechDe

Post by Poshu »

much much MUCH more impressive: 5000 balls at 60 fps on my htpc (1.80ghz atom and a nvidia ion 2). I'm in love.
Locked