Recent

Author Topic: BGRA Controls  (Read 225453 times)

circular

  • Hero Member
  • *****
  • Posts: 4221
    • Personal webpage
Re: BGRA-Controls
« Reply #165 on: April 30, 2016, 10:30:37 am »
Hi Lainz!

Regarding the demo, coasting says he's taking care of posting new updates. So I would rather let him use this code.

I am not sure about changing the reference to BGRABitmap4LCL_OpenGL package in general, because this does the following:
- imposes RGBA order on bitmaps (which is a bit slower on windows)
- adds a dependency to lazopenglcontext package

For people who don't use OpenGL, it is better to keep the regular version. I don't know if there is an easy solution. For now, I would say that people need to change the reference in BGRAControls package to either BGRABitmap or BGRABitmap4LCL_OpenGL depending on their needs. If they are going to use BGRABitmap4LCL_OpenGL package (for TBGLVirtualScreen and OpenGL functions), then they need to change the reference in BGRAControls package accordingly.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: BGRA-Controls
« Reply #166 on: April 30, 2016, 03:05:02 pm »
Ok, so it is slower on windows, well i'm reverting the changes now ;)

circular

  • Hero Member
  • *****
  • Posts: 4221
    • Personal webpage
Re: BGRA-Controls
« Reply #167 on: April 30, 2016, 04:51:27 pm »
Yes, apologies.

I am thinking in fact that maybe with OpenGL we could use the same channel order (BGRA for Windows and RGBA for Linux) and simply swap when sending textures to OpenGL. Indeed the gain of speed with OpenGL is only when keeping the same textures and avoiding any transfer of textures so the swaping of red and blue is not very important for that.

Still the package for OpenGL would depend on lazopenglcontext package.
Conscience is the debugger of the mind

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: BGRA-Controls
« Reply #168 on: April 30, 2016, 05:36:28 pm »
But we need a better way to manage these situations like we talked before.

circular

  • Hero Member
  • *****
  • Posts: 4221
    • Personal webpage
Re: BGRA-Controls
« Reply #169 on: April 30, 2016, 05:40:45 pm »
Yes. Well the thing is the pixel format is defined by the record TBGRAPixel so it is not possible to compile two versions with a different definition of it within the same program.

I am thinking maybe to split things differently. Like putting the maximum of the OpenGL stuff in the main BGRABitmap package, and add other packages that plug into this one. And so the OpenGL package would use the usual TBGRAPixel. As said before, it does not really matter because textures are loaded once, swapping red/blue does not matter much for the framerate.
Conscience is the debugger of the mind

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: BGRA-Controls
« Reply #170 on: April 30, 2016, 05:46:05 pm »
It seems a better solution.

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: BGRA-Controls
« Reply #171 on: July 12, 2016, 09:18:32 pm »
Hi, I'm releasing BGRA-Controls v3.8

  • Added BCButtonFocus
  • Added BCRadialProgressBar
  • Added BGRA Ribbon Custom
  • Minor fixes

Download it here:
https://github.com/bgrabitmap/bgracontrols/releases

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: BGRA-Controls
« Reply #172 on: August 22, 2016, 01:35:07 am »
I'm updating the Git repository with new stuff:
- Added fpGUI theme (Windows 8 / 10 like) is a draft and I think I'm not updating this anymore, doesn't worth, use LCL default if you need native
- Added Plugins test in extra folder, how to create a dll to add third party functionality to a virtual screen
- Added material design animation test in extra folder, how to create a button with material design animation like

Edit: Added material design button component

Get it here:
https://github.com/bgrabitmap/bgracontrols
« Last Edit: August 23, 2016, 04:25:10 pm by lainz »

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: BGRA-Controls
« Reply #173 on: August 29, 2016, 12:52:02 am »
BGRA Controls v3.9

Download:
https://github.com/bgrabitmap/bgracontrols/releases

Changelog:
* Added Material Design Button
* Added fpGUI theme test extra
* Added plugins test extra
* Fixes compiling in lazarus trunk

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: BGRA-Controls
« Reply #174 on: September 02, 2016, 12:06:04 am »
BGRA Controls v4.0

Download:
https://github.com/bgrabitmap/bgracontrols/releases

Changelog:
* Added BGRA Custom Drawn controls, see here: http://forum.lazarus-ide.org/index.php/topic,33887.msg220730/topicseen.html

We have about 33 different controls now!

Josh

  • Hero Member
  • *****
  • Posts: 1274
Re: BGRA-Controls
« Reply #175 on: September 02, 2016, 05:18:51 am »
Hi Lainz,
Went to try Version 4 ( Laz 1.3, fpc 2.7.1 on Windows)
and I get
bgracontrols-4.0\bgracustomdrawn.pas(61,15) Error: There is no method in an ancestor class to be overridden: "DrawButton(TFPCustomCanvas;POINT;SIZE;TCDControlState;TCDButtonStateEx);"

Same error using Laz 1.4.4 on OSX

Is the update only for FPC 3 and above?

Josh
« Last Edit: September 02, 2016, 05:32:51 am by josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: BGRA-Controls
« Reply #176 on: September 02, 2016, 02:56:27 pm »
Hi Lainz,
Went to try Version 4 ( Laz 1.3, fpc 2.7.1 on Windows)
and I get
bgracontrols-4.0\bgracustomdrawn.pas(61,15) Error: There is no method in an ancestor class to be overridden: "DrawButton(TFPCustomCanvas;POINT;SIZE;TCDControlState;TCDButtonStateEx);"

Same error using Laz 1.4.4 on OSX

Is the update only for FPC 3 and above?

Josh

I'm using it with Lazarus 1.6 and Lazarus trunk. If you can't compile you can:
- Remove that unit from the package.
- Update all custom drawn units (note that are a lot, not only these included in the customdrawn package, see the folder LCL for example).

Josh

  • Hero Member
  • *****
  • Posts: 1274
Re: BGRA-Controls
« Reply #177 on: September 02, 2016, 03:17:16 pm »
Hi Lainz,

I can't compile the package to install it.

Is it now only for Laz 1.6/1.7 with FPC 3.0.0 or above?

The best way to get accurate information on the forum is to post something wrong and wait for corrections.

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: BGRA-Controls
« Reply #178 on: September 02, 2016, 03:31:49 pm »
Hi Lainz,

I can't compile the package to install it.

Is it now only for Laz 1.6/1.7 with FPC 3.0.0 or above?

Maybe customdrawn is not available in older versions of lazarus?

Try the BGRAControls 3.8/3.9 is available for download on github, you will get everything except the new Custom Drawn ones.

PD: I forget, in 3.9 and newer there is a new dependency with LazUTF8, maybe is not available in older lazarus too.
« Last Edit: September 02, 2016, 03:33:45 pm by lainz »

esvignolo

  • Full Member
  • ***
  • Posts: 159
  • Using FPC in Windows, Linux, Macos
Re: BGRA-Controls
« Reply #179 on: September 02, 2016, 07:04:14 pm »
@Lainz,@circular, i just want to write to thank you for the time, effort and a lot of knowledge you put into FPC. And give us new tools to developers.

Many others thanks.

BGRA Controls v4.0

Download:
https://github.com/bgrabitmap/bgracontrols/releases

Changelog:
* Added BGRA Custom Drawn controls, see here: http://forum.lazarus-ide.org/index.php/topic,33887.msg220730/topicseen.html

We have about 33 different controls now!
« Last Edit: September 02, 2016, 07:15:55 pm by esvignolo »

 

TinyPortal © 2005-2018