Recent

Author Topic: New version of BGRABitmap  (Read 288378 times)

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #120 on: May 26, 2015, 02:24:45 pm »
Nice! It's possible to have a BGRAVirtualScreen but something like BGRAOpenGLScreen?

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: New version of BGRABitmap
« Reply #121 on: May 26, 2015, 06:09:18 pm »
It is a good idea. I have started to develop a canvas for OpenGL in the same style as TBGRABitmap. For now, I found how to provide aliased functions. Doing direct antialiasing seems impossible, except maybe using multisampling. So basically all functions would be like Ellipse, Rectangle, etc. with floating point coordinates, but rendered without antialising.

The antialiasing would be possible with a multisample property of the BGRAOpenGLScreen. So that would not be an antialiasing as nice as TBGRABitmap, but still better than nothing. I don't know yet how far I can get with that.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #122 on: May 26, 2015, 09:26:22 pm »
Ok, keep going ;)

With this I can upgrade my game that just uses bitmaps and improve the rendering speed / FPS a lot right?

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: New version of BGRABitmap
« Reply #123 on: May 26, 2015, 09:28:51 pm »
Absolutely.  :)

If there are a few sprites, you can easily get 200 frames per second. So definitely you can do a lot of things in one frame until you get to 60 frames per second.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #124 on: May 26, 2015, 10:11:17 pm »
Ok!

Now I can't install BGRABitmap:

Code: [Select]
bgrafreetype.pas(124,15) Error: There is no method in an ancestor class to be overridden: "TBGRAFreeTypeDrawer.DrawGlyph(LongInt,TFreeTypeRenderableFont,Single,Single,TFPColor);"
If I remove the override thing, there are other errors:

Code: [Select]
bgrafreetype.pas(566,7) Error: identifier idents no member "RenderGlyph"
bgrafreetype.pas(568,7) Error: identifier idents no member "RenderGlyph"
bgrafreetype.pas(581,54) Error: Incompatible type for arg no. 5: Got "TFPColor", expected "TBGRAPixel"

Both $IFDEF BGRABITMAP_USE_LCL12 and $IFDEF BGRABITMAP_USE_LCL15 are enabled in Lazarus 1.4.0 32-bits.

So, I removed "use bgrafreetype" unit in package and compiled.

Dick Maley

  • New Member
  • *
  • Posts: 26
Re: New version of BGRABitmap
« Reply #125 on: May 27, 2015, 01:03:12 am »
I am trying to build "bgracontrols.lpk".

It throws an error in "BCToolBar.pas".

The error is:
bctoolbar.pas(84,10) Error: identifier idents no member "HorizLine"

All code is newly downloaded.

Why am I getting this error?

Thank you.

Dick Maley




circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: New version of BGRABitmap
« Reply #126 on: May 27, 2015, 10:38:05 pm »
Hi 007!

Ah yes, there are compilation options in bgrabitmap.inc so that it is possible deactivate some features depending on the version. I noticed that testing version using LCL_FULLVERSION was not working so I've put directives in this file.

I guess most people have Lazarus 1.4 or lower, so I changed those directives so that by default functions of Lazarus 1.5 are not used.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #127 on: May 28, 2015, 05:43:04 pm »
Hi 007!

Ah yes, there are compilation options in bgrabitmap.inc so that it is possible deactivate some features depending on the version. I noticed that testing version using LCL_FULLVERSION was not working so I've put directives in this file.

I guess most people have Lazarus 1.4 or lower, so I changed those directives so that by default functions of Lazarus 1.5 are not used.

Ok thanks!

I am trying to build "bgracontrols.lpk".

It throws an error in "BCToolBar.pas".

The error is:
bctoolbar.pas(84,10) Error: identifier idents no member "HorizLine"

All code is newly downloaded.

Why am I getting this error?

Thank you.

Dick Maley

What's your OS and Lazarus version, BGRABitmap version, BGRAControls version?

Here is working under Windows and Lazarus 1.4, BGRABitmap and BGRAControls trunk.

Josh

  • Hero Member
  • *****
  • Posts: 1274
Re: New version of BGRABitmap
« Reply #128 on: June 09, 2015, 08:38:40 am »
Hi Circular,

Not sure if this is a Bug/Problem.

I have just upgraded to 8.6 and now I am having a problem with TBCLabel.
If I have background style set to bbsClear, and no caption the tbclabel background goes black, if caption is set then TBCLabel Background is correct.
If you set the Border to bboSolid, it display correctly. Setting to bboNone it display wrong.

Only happened when Upgraded to 8.6.
I have attached lpi,unit and lfm.

Another problem which is not so easy to replicate, is that after upgrade on a project that uses TBGRAShape, i was getting a black background color; when Fill Opacity is set at 0 (obscuring the underlying image), If I set this to 1, then I can see the underlying image as required.

I suspect other controls maybe effected.

Going back to 8.5.2 all is ok.

Bgracontrols 3.6

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

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: New version of BGRABitmap
« Reply #129 on: June 10, 2015, 12:41:56 am »
@josh:
Does it solve the problem to add in the unit BGRAWinBitmap the line
Quote
if Empty then exit;
in the procedure TBGRAWinBitmap.Draw, in the following block:
Quote
else
  begin
    if Empty then exit; //add here
    if LineOrder = riloTopToBottom then VerticalFlip;
    LoadFromBitmapIfNeeded;
    ACanvas.StretchDraw(Rect, Bitmap);
    if LineOrder = riloTopToBottom then VerticalFlip;
  end;
?
Conscience is the debugger of the mind

Josh

  • Hero Member
  • *****
  • Posts: 1274
Re: New version of BGRABitmap
« Reply #130 on: June 10, 2015, 06:55:46 am »
Hi Circular

I have done a quick test, and it appears to solve the problem with tbclabel.

AFter I made the  change, I clean and built (delete all) the project I attached, the IDE form had not updated, but the exe file has changed.
If I copy Paste the tbclabel on the form and set caption to blank, the new label does update. But the Existing one does not.
Hope that makes sense.

So yes the exe is now fine, which is the main concern.

Cheers
Josh

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

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #131 on: June 10, 2015, 07:08:17 am »
Hi Circular

I have done a quick test, and it appears to solve the problem with tbclabel.

AFter I made the  change, I clean and built (delete all) the project I attached, the IDE form had not updated, but the exe file has changed.
If I copy Paste the tbclabel on the form and set caption to blank, the new label does update. But the Existing one does not.
Hope that makes sense.

So yes the exe is now fine, which is the main concern.

Cheers
Josh

Try deleting all the lib folders from bgrabitmap, bgracontrols and your project and build the ide again.

Josh

  • Hero Member
  • *****
  • Posts: 1274
Re: New version of BGRABitmap
« Reply #132 on: June 10, 2015, 08:53:38 am »
Hi
I have tried deleting lib folders, rebuilding ide, clean up and delete project.
The problem is in the IDE,
the compiled exe is fine.
I was going to upload a 3MB video showing the issue, however the forum will not allow this.

It is probably something I have done/not done :)
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: New version of BGRABitmap
« Reply #133 on: June 10, 2015, 10:16:42 am »
I had a similar problem, solved by going in the BGRABitmap package, and doing "Clean and recompile". Then running/recompiling the IDE would work well.
Conscience is the debugger of the mind

Josh

  • Hero Member
  • *****
  • Posts: 1274
Re: New version of BGRABitmap
« Reply #134 on: June 10, 2015, 07:35:10 pm »
Hi Circular,

Yes that done the trick.

Thanks for your and 007's prompt response.
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

 

TinyPortal © 2005-2018