Recent

Author Topic: Fast Canvas Library V1.052  (Read 20582 times)

440bx

  • Hero Member
  • *****
  • Posts: 5809
Re: Fast Canvas Library V1.052
« Reply #60 on: September 17, 2025, 01:16:47 am »
It's looking really good.

Looking forward to the final version. :)  Thank you for sharing.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Gigatron

  • Sr. Member
  • ****
  • Posts: 334
  • Amiga Rulez !!
Re: Fast Canvas Library V1.052
« Reply #61 on: September 20, 2025, 11:50:17 pm »
It's looking really good.

Looking forward to the final version. :)  Thank you for sharing.

Thank you @440bx

So you can do some nice fx with this glcanvas V0.049.. contain now some

Vector Text draw, Centered drawText, 2D/3D SpriteStarfield ...
Texture Bounce 255 max ! mtVector movement .. mt mean Movement Type defined like this:

Code: Pascal  [Select][+][-]
  1. TGLMovementType = (
  2.     mtLinear,
  3.     mtSinus,
  4.     mtCircular,
  5.     mtSpiral,
  6.     mtFigure8,
  7.     mtZigZag,
  8.     mtVector,
  9.     mtTriangle,
  10.     mtBreakOut
  11.   );  

All textures are included in the  .zip file.
Do you have any ideas for effects to include for the final version? :)

Have fun ;
« Last Edit: September 20, 2025, 11:54:01 pm by Gigatron »
Trip to Europe...  20 days

440bx

  • Hero Member
  • *****
  • Posts: 5809
Re: Fast Canvas Library V1.052
« Reply #62 on: September 21, 2025, 01:36:08 am »
@Gigatron,

My pleasure.

Do you have any ideas for effects to include for the final version? :)
As far as ideas, one effect I really like is the "glow effect".   Sort of an example of it can be found at
https://forum.lazarus.freepascal.org/index.php/topic,58138.msg433109.html#msg433109

Another place where it was used is/was in the Windows logo when booting Windows 7.  Those are the two examples that come to mind at this time.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Gigatron

  • Sr. Member
  • ****
  • Posts: 334
  • Amiga Rulez !!
Re: Fast Canvas Library V1.052
« Reply #63 on: September 22, 2025, 12:15:30 am »
Hi

Here two example on the left with pixelshader(blur)  and the right glcommand : glDrawTexture2DGlow;

I think the windows7 boot screen is made with gaussian blurfx.

Please test this project.

Regards
Trip to Europe...  20 days

elkhalafy

  • Newbie
  • Posts: 4
Re: Fast Canvas Library V1.052
« Reply #64 on: September 23, 2025, 07:43:14 pm »
Download the library please?

Gigatron

  • Sr. Member
  • ****
  • Posts: 334
  • Amiga Rulez !!
Re: Fast Canvas Library V1.052
« Reply #65 on: September 23, 2025, 09:15:23 pm »
Download the library please?

Hi
You must download project1.zip above (glCanvas.pas) is included;

Regards
Trip to Europe...  20 days

elkhalafy

  • Newbie
  • Posts: 4
Re: Fast Canvas Library V1.052
« Reply #66 on: September 24, 2025, 08:27:53 am »
Download the library please?

Hi
You must download project1.zip above (glCanvas.pas) is included;

Regards

Okay, Thank you

Gigatron

  • Sr. Member
  • ****
  • Posts: 334
  • Amiga Rulez !!
Re: Fast Canvas Library V1.052
« Reply #67 on: October 05, 2025, 11:37:24 pm »
Hi

This is the Final release of glCanvas 0.50 some nice fx were added like
Faster than light outline text draw , auto centeredX text .. etc..
Atom demo included with amigadigital88 font..

Have fun
« Last Edit: October 05, 2025, 11:43:34 pm by Gigatron »
Trip to Europe...  20 days

DrakkTheSeafarer

  • New member
  • *
  • Posts: 7
Re: Fast Canvas Library V1.052
« Reply #68 on: October 06, 2025, 10:53:09 am »
Thank you for sharing.   8-)

cris75

  • Jr. Member
  • **
  • Posts: 75
Re: Fast Canvas Library V1.052
« Reply #69 on: October 08, 2025, 04:46:28 pm »
Hi,
Thank you for sharing.
I'm on Debian 12 (KDE / X11) had this error trying to compile project1

Quote
glCanvas.pas(1246,25) Error: Identifier not found "glXGetProcAddress"

In case it could be useful to someone else, to "fix" it I just needed to comment out line 1242
Code: Pascal  [Select][+][-]
  1. //glXSwapIntervalSGI := nil;
and change line 1246 to
Code: Pascal  [Select][+][-]
  1. Pointer(glXSwapIntervalSGI) := wglGetProcAddress(PAnsiChar('glXSwapIntervalSGI'));

Lazarus: 4.2 / FPC: 3.2.2 [x86_64-win64-win32/x86_64-linux-qt5/]
Win10 x64
Debian 12

Gigatron

  • Sr. Member
  • ****
  • Posts: 334
  • Amiga Rulez !!
Re: Fast Canvas Library V1.052
« Reply #70 on: October 08, 2025, 06:41:08 pm »
Hi,
Thank you for sharing.
I'm on Debian 12 (KDE / X11) had this error trying to compile project1

Quote
glCanvas.pas(1246,25) Error: Identifier not found "glXGetProcAddress"

In case it could be useful to someone else, to "fix" it I just needed to comment out line 1242
Code: Pascal  [Select][+][-]
  1. //glXSwapIntervalSGI := nil;
and change line 1246 to
Code: Pascal  [Select][+][-]
  1. Pointer(glXSwapIntervalSGI) := wglGetProcAddress(PAnsiChar('glXSwapIntervalSGI'));

Hi , Thanks for testing with linux.
You mean like that ? If so i will update the glCanvas.

Code: Pascal  [Select][+][-]
  1.  // pour linux .. a voir si ça marche !! correction le 08/10/2025 18h38
  2.   {$IFDEF LINUX}
  3.  //  glXSwapIntervalSGI := nil;
  4.   {$ENDIF}
  5.  
  6.   {$IFDEF LINUX}
  7.   Pointer(glXSwapIntervalSGI) := glXGetProcAddress(PAnsiChar('glXSwapIntervalSGI'));
  8.   if not Assigned(glXSwapIntervalSGI) then
  9.     raise Exception.Create('GLX_SGI_swap_control not supported by driver');
  10.  
  11.   if Enable then
  12.     glXSwapIntervalSGI(1)
  13.   else
  14.     glXSwapIntervalSGI(0);
  15.   {$ENDIF}    

Trip to Europe...  20 days

cris75

  • Jr. Member
  • **
  • Posts: 75
Re: Fast Canvas Library V1.052
« Reply #71 on: October 08, 2025, 07:10:48 pm »
Hi,
yes but note line 1246 (line 7 in the code snippet), not glXGetProcAddress but wglGetProcAddress, this way it complies for me
glXGetProcAddress is not found

Code: Pascal  [Select][+][-]
  1.   // pour linux .. a voir si ça marche !!
  2.   {$IFDEF LINUX}
  3.    //glXSwapIntervalSGI := nil;
  4.   {$ENDIF}
  5.  
  6.   {$IFDEF LINUX}
  7.   Pointer(glXSwapIntervalSGI) := wglGetProcAddress(PAnsiChar('glXSwapIntervalSGI'));
  8.   if not Assigned(glXSwapIntervalSGI) then
  9.     raise Exception.Create('GLX_SGI_swap_control not supported by driver');
  10.  
  11.   if Enable then
  12.     glXSwapIntervalSGI(1)
  13.   else
  14.     glXSwapIntervalSGI(0);
  15.   {$ENDIF}
  16.  
Lazarus: 4.2 / FPC: 3.2.2 [x86_64-win64-win32/x86_64-linux-qt5/]
Win10 x64
Debian 12

Gigatron

  • Sr. Member
  • ****
  • Posts: 334
  • Amiga Rulez !!
Re: Fast Canvas Library V1.052
« Reply #72 on: October 08, 2025, 07:29:38 pm »
Ok

This version fix linux compilation error and include some new commands like
plasma, flag ,FBM plasma(internal shader) , UV scrolling and some memory leaks fix.
No need to free texture, chars  and shaders ondestroy Form1.

Regards


« Last Edit: October 09, 2025, 01:14:01 am by Gigatron »
Trip to Europe...  20 days

cris75

  • Jr. Member
  • **
  • Posts: 75
Re: Fast Canvas Library V1.052
« Reply #73 on: October 09, 2025, 10:16:52 am »
Works great, thank you!!
Lazarus: 4.2 / FPC: 3.2.2 [x86_64-win64-win32/x86_64-linux-qt5/]
Win10 x64
Debian 12

 

TinyPortal © 2005-2018