ProGUI V1.38 UI Library (Small Bug Fix)
-
- 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)
That looks pretty cool.
Re: ProGUI V1.36 User Interface Library (Small bug fix)
Thanks!Zach wrote:That looks pretty cool.

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
- electrochrisso
- Addict
- Posts: 989
- Joined: Mon May 14, 2007 2:13 am
- Location: Darling River
Re: ProGUI V1.36 User Interface Library (Small bug fix)
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
man.
Super

PureBasic! Purely the best 

Re: ProGUI V1.36 User Interface Library (Small bug fix)
Thanks mate!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%.
Superman.


Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
- electrochrisso
- Addict
- Posts: 989
- Joined: Mon May 14, 2007 2:13 am
- Location: Darling River
Re: ProGUI V1.36 User Interface Library (Small bug fix)
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.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
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.

You have really done some great optimisation in your code mate.

PureBasic! Purely the best 

Re: ProGUI V1.36 User Interface Library (Small bug fix)
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 farelectrochrisso 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.![]()
You have really done some great optimisation in your code mate.

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Re: ProGUI V1.36 User Interface Library (Small bug fix)
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!
) 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!
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:



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!
Chris.
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!

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!

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:



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

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

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Re: ProGUI V1.36 User Interface Library (Small bug fix)
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!
Well done Chris.
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!

Well done Chris.
I may look like a mule, but I'm not a complete ass.
Re: ProGUI V1.36 User Interface Library (Small bug fix)
Thanks Stephen!!
I'm glad it's working great and thanks for reporting your specs too it helps a lot 
Chris.



Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
- electrochrisso
- Addict
- Posts: 989
- Joined: Mon May 14, 2007 2:13 am
- Location: Darling River
Re: ProGUI V1.36 User Interface Library (Small bug fix)


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 

-
- 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)
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
(I hope)
I ran the tech demo, at 10k balls at 30 and 60FPS no problem
Once you get the Text commands in, I think I can build my whole Game GUI with this

I ran the tech demo, at 10k balls at 30 and 60FPS no problem

Re: ProGUI V1.36 User Interface Library (Small bug fix)
Thanks for testing dudeelectrochrisso wrote: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.
, 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.

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(I hope)
I ran the tech demo, at 10k balls at 30 and 60FPS no problem




Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Re: ProGUI V1.36 UI Library (Exciting Direct2D News + TechDe
60000 balls and everything is still so smooth 

Re: ProGUI V1.36 UI Library (Exciting Direct2D News + TechDe
Sweet! thanks Poshu matePoshu wrote:60000 balls and everything is still so smooth

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Re: ProGUI V1.36 UI Library (Exciting Direct2D News + TechDe
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.